LLObjectSelection Class Reference

#include <llselectmgr.h>

Inheritance diagram for LLObjectSelection:

Inheritance graph
[legend]
Collaboration diagram for LLObjectSelection:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::list< LLSelectNode * > list_t
typedef boost::filter_iterator<
is_non_null, list_t::iterator > 
iterator
typedef boost::filter_iterator<
is_valid, list_t::iterator > 
valid_iterator
typedef boost::filter_iterator<
is_root, list_t::iterator > 
root_iterator
typedef boost::filter_iterator<
is_root, list_t::iterator > 
valid_root_iterator
typedef boost::filter_iterator<
is_root_object, list_t::iterator > 
root_object_iterator

Public Member Functions

iterator begin ()
iterator end ()
valid_iterator valid_begin ()
valid_iterator valid_end ()
root_iterator root_begin ()
root_iterator root_end ()
valid_root_iterator valid_root_begin ()
valid_root_iterator valid_root_end ()
root_object_iterator root_object_begin ()
root_object_iterator root_object_end ()
 LLObjectSelection ()
void updateEffects ()
void cleanupNodes ()
BOOL isEmpty ()
S32 getOwnershipCost (S32 &cost)
LLSelectNodegetFirstNode (LLSelectedNodeFunctor *func=NULL)
LLSelectNodegetFirstRootNode (LLSelectedNodeFunctor *func=NULL, BOOL non_root_ok=FALSE)
LLViewerObjectgetFirstSelectedObject (LLSelectedNodeFunctor *func, BOOL get_parent=FALSE)
LLViewerObjectgetFirstObject ()
LLViewerObjectgetFirstRootObject (BOOL non_root_ok=FALSE)
LLSelectNodegetFirstMoveableNode (BOOL get_root_first=FALSE)
LLViewerObjectgetFirstEditableObject (BOOL get_parent=FALSE)
LLViewerObjectgetFirstCopyableObject (BOOL get_parent=FALSE)
LLViewerObjectgetFirstDeleteableObject ()
LLViewerObjectgetFirstMoveableObject (BOOL get_parent=FALSE)
LLViewerObjectgetPrimaryObject ()
template<typename T>
bool getSelectedTEValue (LLSelectedTEGetFunctor< T > *func, T &res)
void addNode (LLSelectNode *nodep)
void addNodeAtEnd (LLSelectNode *nodep)
void moveNodeToFront (LLSelectNode *nodep)
void removeNode (LLSelectNode *nodep)
void deleteAllNodes ()
S32 getNumNodes ()
LLSelectNodefindNode (LLViewerObject *objectp)
S32 getObjectCount ()
S32 getTECount ()
S32 getRootObjectCount ()
BOOL contains (LLViewerObject *object)
BOOL contains (LLViewerObject *object, S32 te)
BOOL isAttachment ()
bool applyToRootObjects (LLSelectedObjectFunctor *func, bool firstonly=false)
bool applyToObjects (LLSelectedObjectFunctor *func, bool firstonly=false)
bool applyToTEs (LLSelectedTEFunctor *func, bool firstonly=false)
bool applyToRootNodes (LLSelectedNodeFunctor *func, bool firstonly=false)
bool applyToNodes (LLSelectedNodeFunctor *func, bool firstonly=false)
ESelectType getSelectType ()

Protected Member Functions

 ~LLObjectSelection ()

Private Member Functions

const LLObjectSelectionoperator= (const LLObjectSelection &)

Private Attributes

list_t mList
LLPointer< LLViewerObjectmPrimaryObject
std::map< LLPointer< LLViewerObject >,
LLSelectNode * > 
mSelectNodeMap
ESelectType mSelectType

Friends

class LLSelectMgr

Classes

struct  is_non_null
struct  is_root
struct  is_root_object
struct  is_valid
struct  is_valid_root

Detailed Description

Definition at line 196 of file llselectmgr.h.


Member Typedef Documentation

typedef boost::filter_iterator<is_non_null, list_t::iterator > LLObjectSelection::iterator

Definition at line 218 of file llselectmgr.h.

typedef std::list<LLSelectNode*> LLObjectSelection::list_t

Definition at line 205 of file llselectmgr.h.

typedef boost::filter_iterator<is_root, list_t::iterator > LLObjectSelection::root_iterator

Definition at line 241 of file llselectmgr.h.

typedef boost::filter_iterator<is_root_object, list_t::iterator > LLObjectSelection::root_object_iterator

Definition at line 265 of file llselectmgr.h.

typedef boost::filter_iterator<is_valid, list_t::iterator > LLObjectSelection::valid_iterator

Definition at line 229 of file llselectmgr.h.

typedef boost::filter_iterator<is_root, list_t::iterator > LLObjectSelection::valid_root_iterator

Definition at line 253 of file llselectmgr.h.


Constructor & Destructor Documentation

LLObjectSelection::~LLObjectSelection (  )  [protected]

Definition at line 5646 of file llselectmgr.cpp.

References deleteAllNodes().

LLObjectSelection::LLObjectSelection (  ) 

Definition at line 5640 of file llselectmgr.cpp.


Member Function Documentation

void LLObjectSelection::addNode ( LLSelectNode nodep  ) 

Definition at line 5674 of file llselectmgr.cpp.

References LLSelectNode::getObject(), LLViewerObject::isDead(), llassert_always, mList, and mSelectNodeMap.

void LLObjectSelection::addNodeAtEnd ( LLSelectNode nodep  ) 

Definition at line 5681 of file llselectmgr.cpp.

References LLSelectNode::getObject(), LLViewerObject::isDead(), llassert_always, mList, and mSelectNodeMap.

Referenced by LLSelectMgr::addGridObject().

bool LLObjectSelection::applyToNodes ( LLSelectedNodeFunctor func,
bool  firstonly = false 
)

Definition at line 5843 of file llselectmgr.cpp.

References begin(), end(), func, and r.

bool LLObjectSelection::applyToObjects ( LLSelectedObjectFunctor func,
bool  firstonly = false 
)

Definition at line 5788 of file llselectmgr.cpp.

References begin(), end(), func, and r.

Referenced by LLSelectMgr::updateEffects().

bool LLObjectSelection::applyToRootNodes ( LLSelectedNodeFunctor func,
bool  firstonly = false 
)

Definition at line 5859 of file llselectmgr.cpp.

References func, r, root_begin(), and root_end().

bool LLObjectSelection::applyToRootObjects ( LLSelectedObjectFunctor func,
bool  firstonly = false 
)

Definition at line 5804 of file llselectmgr.cpp.

References func, r, root_begin(), and root_end().

bool LLObjectSelection::applyToTEs ( LLSelectedTEFunctor func,
bool  firstonly = false 
)

Definition at line 5820 of file llselectmgr.cpp.

References begin(), end(), func, LLPrimitive::getNumTEs(), LLSelectNode::isTESelected(), r, and S32.

iterator LLObjectSelection::begin (  )  [inline]

Definition at line 219 of file llselectmgr.h.

References mList.

Referenced by applyToNodes(), applyToObjects(), applyToTEs(), contains(), getFirstNode(), LLSelectMgr::getGrid(), getSelectedTEValue(), and getTECount().

void LLObjectSelection::cleanupNodes (  ) 

Definition at line 5651 of file llselectmgr.cpp.

References LLSelectNode::getObject(), LLViewerObject::isDead(), mList, and NULL.

Referenced by LLSelectMgr::getGrid(), and getObjectCount().

BOOL LLObjectSelection::contains ( LLViewerObject object,
S32  te 
)

Definition at line 5887 of file llselectmgr.cpp.

References begin(), end(), FALSE, LLSelectNode::getObject(), i, LLSelectNode::isTESelected(), S32, SELECT_ALL_TES, SELECT_MAX_TES, and TRUE.

BOOL LLObjectSelection::contains ( LLViewerObject object  ) 

Definition at line 5878 of file llselectmgr.cpp.

References findNode(), and NULL.

void LLObjectSelection::deleteAllNodes (  ) 

Definition at line 5705 of file llselectmgr.cpp.

References mList, mPrimaryObject, mSelectNodeMap, and NULL.

Referenced by LLSelectMgr::clearGridObjects(), LLSelectMgr::clearSelections(), and ~LLObjectSelection().

iterator LLObjectSelection::end (  )  [inline]

Definition at line 220 of file llselectmgr.h.

References mList.

Referenced by applyToNodes(), applyToObjects(), applyToTEs(), contains(), getFirstNode(), LLSelectMgr::getGrid(), getSelectedTEValue(), and getTECount().

LLSelectNode * LLObjectSelection::findNode ( LLViewerObject objectp  ) 

Definition at line 5713 of file llselectmgr.cpp.

References mSelectNodeMap, and NULL.

Referenced by contains().

LLViewerObject * LLObjectSelection::getFirstCopyableObject ( BOOL  get_parent = FALSE  ) 

Definition at line 6039 of file llselectmgr.cpp.

References f, func, getFirstSelectedObject(), LLSelectNode::getObject(), LLViewerObject::isAttachment(), and LLViewerObject::permCopy().

LLViewerObject * LLObjectSelection::getFirstDeleteableObject (  ) 

Definition at line 6055 of file llselectmgr.cpp.

References f, func, getFirstNode(), LLSelectNode::getObject(), LLViewerObject::isAttachment(), LLViewerObject::isOverAgentOwnedLand(), LLViewerObject::isOverGroupOwnedLand(), NULL, LLViewerObject::permAnyOwner(), LLViewerObject::permModify(), LLViewerObject::permYouOwner(), and TRUE.

LLViewerObject * LLObjectSelection::getFirstEditableObject ( BOOL  get_parent = FALSE  ) 

Definition at line 6091 of file llselectmgr.cpp.

References f, func, getFirstSelectedObject(), LLSelectNode::getObject(), and LLViewerObject::permModify().

LLSelectNode * LLObjectSelection::getFirstMoveableNode ( BOOL  get_root_first = FALSE  ) 

Definition at line 6022 of file llselectmgr.cpp.

References f, func, getFirstNode(), getFirstRootNode(), LLSelectNode::getObject(), LLViewerObject::permMove(), and TRUE.

LLViewerObject * LLObjectSelection::getFirstMoveableObject ( BOOL  get_parent = FALSE  ) 

Definition at line 6107 of file llselectmgr.cpp.

References f, func, getFirstSelectedObject(), LLSelectNode::getObject(), and LLViewerObject::permMove().

LLSelectNode * LLObjectSelection::getFirstNode ( LLSelectedNodeFunctor func = NULL  ) 

Definition at line 5952 of file llselectmgr.cpp.

References begin(), end(), func, and NULL.

Referenced by getFirstDeleteableObject(), getFirstMoveableNode(), getFirstObject(), getFirstRootNode(), and getFirstSelectedObject().

LLViewerObject * LLObjectSelection::getFirstObject (  ) 

Definition at line 6004 of file llselectmgr.cpp.

References getFirstNode(), LLSelectNode::getObject(), and NULL.

Referenced by LLSelectMgr::getGrid().

LLSelectNode * LLObjectSelection::getFirstRootNode ( LLSelectedNodeFunctor func = NULL,
BOOL  non_root_ok = FALSE 
)

Definition at line 5965 of file llselectmgr.cpp.

References func, getFirstNode(), NULL, root_begin(), and root_end().

Referenced by getFirstMoveableNode(), and getFirstRootObject().

LLViewerObject * LLObjectSelection::getFirstRootObject ( BOOL  non_root_ok = FALSE  ) 

Definition at line 6013 of file llselectmgr.cpp.

References getFirstRootNode(), LLSelectNode::getObject(), and NULL.

LLViewerObject * LLObjectSelection::getFirstSelectedObject ( LLSelectedNodeFunctor func,
BOOL  get_parent = FALSE 
)

Definition at line 5987 of file llselectmgr.cpp.

References func, getFirstNode(), LLSelectNode::getObject(), getSelectedParentObject(), and NULL.

Referenced by getFirstCopyableObject(), getFirstEditableObject(), and getFirstMoveableObject().

S32 LLObjectSelection::getNumNodes (  ) 

Definition at line 5669 of file llselectmgr.cpp.

References mList.

S32 LLObjectSelection::getObjectCount (  ) 

Definition at line 5745 of file llselectmgr.cpp.

References cleanupNodes(), count, mList, and S32.

Referenced by getOwnershipCost().

BOOL LLObjectSelection::getOwnershipCost ( S32 cost  ) 

Definition at line 5734 of file llselectmgr.cpp.

References count, getObjectCount(), OWNERSHIP_COST_PER_OBJECT, and S32.

LLViewerObject* LLObjectSelection::getPrimaryObject (  )  [inline]

Definition at line 291 of file llselectmgr.h.

References mPrimaryObject.

Referenced by getSelectedTEValue().

S32 LLObjectSelection::getRootObjectCount (  ) 

Definition at line 5778 of file llselectmgr.cpp.

References count, root_begin(), root_end(), and S32.

template<typename T>
bool LLObjectSelection::getSelectedTEValue ( LLSelectedTEGetFunctor< T > *  func,
T &  res 
)

Definition at line 717 of file llselectmgr.h.

References begin(), end(), func, LLPrimitive::getNumTEs(), getPrimaryObject(), S32, and TRUE.

ESelectType LLObjectSelection::getSelectType (  )  [inline]

Definition at line 324 of file llselectmgr.h.

References mSelectType.

S32 LLObjectSelection::getTECount (  ) 

Definition at line 5756 of file llselectmgr.cpp.

References begin(), count, end(), LLPrimitive::getNumTEs(), and S32.

BOOL LLObjectSelection::isAttachment (  ) 

Definition at line 5924 of file llselectmgr.cpp.

References mSelectType, SELECT_TYPE_ATTACHMENT, and SELECT_TYPE_HUD.

BOOL LLObjectSelection::isEmpty (  ) 

Definition at line 5726 of file llselectmgr.cpp.

References mList.

void LLObjectSelection::moveNodeToFront ( LLSelectNode nodep  ) 

Definition at line 5688 of file llselectmgr.cpp.

References mList.

const LLObjectSelection& LLObjectSelection::operator= ( const LLObjectSelection  )  [private]

void LLObjectSelection::removeNode ( LLSelectNode nodep  ) 

Definition at line 5694 of file llselectmgr.cpp.

References LLSelectNode::getObject(), mList, mPrimaryObject, mSelectNodeMap, NULL, and LLSelectNode::setObject().

root_iterator LLObjectSelection::root_begin (  )  [inline]

Definition at line 242 of file llselectmgr.h.

References mList.

Referenced by applyToRootNodes(), applyToRootObjects(), getFirstRootNode(), and getRootObjectCount().

root_iterator LLObjectSelection::root_end (  )  [inline]

Definition at line 243 of file llselectmgr.h.

References mList.

Referenced by applyToRootNodes(), applyToRootObjects(), getFirstRootNode(), and getRootObjectCount().

root_object_iterator LLObjectSelection::root_object_begin (  )  [inline]

Definition at line 266 of file llselectmgr.h.

References mList.

root_object_iterator LLObjectSelection::root_object_end (  )  [inline]

Definition at line 267 of file llselectmgr.h.

References mList.

void LLObjectSelection::updateEffects (  ) 

Definition at line 5665 of file llselectmgr.cpp.

valid_iterator LLObjectSelection::valid_begin (  )  [inline]

Definition at line 230 of file llselectmgr.h.

References mList.

valid_iterator LLObjectSelection::valid_end (  )  [inline]

Definition at line 231 of file llselectmgr.h.

References mList.

valid_root_iterator LLObjectSelection::valid_root_begin (  )  [inline]

Definition at line 254 of file llselectmgr.h.

References mList.

valid_root_iterator LLObjectSelection::valid_root_end (  )  [inline]

Definition at line 255 of file llselectmgr.h.

References mList.


Friends And Related Function Documentation

friend class LLSelectMgr [friend]

Definition at line 198 of file llselectmgr.h.


Member Data Documentation

list_t LLObjectSelection::mList [private]

Definition at line 207 of file llselectmgr.h.

Referenced by addNode(), addNodeAtEnd(), begin(), cleanupNodes(), deleteAllNodes(), end(), getNumNodes(), getObjectCount(), isEmpty(), moveNodeToFront(), removeNode(), root_begin(), root_end(), root_object_begin(), root_object_end(), valid_begin(), valid_end(), valid_root_begin(), and valid_root_end().

LLPointer<LLViewerObject> LLObjectSelection::mPrimaryObject [private]

Definition at line 329 of file llselectmgr.h.

Referenced by deleteAllNodes(), getPrimaryObject(), and removeNode().

std::map<LLPointer<LLViewerObject>, LLSelectNode*> LLObjectSelection::mSelectNodeMap [private]

Definition at line 330 of file llselectmgr.h.

Referenced by addNode(), addNodeAtEnd(), deleteAllNodes(), findNode(), and removeNode().

ESelectType LLObjectSelection::mSelectType [private]

Definition at line 331 of file llselectmgr.h.

Referenced by getSelectType(), and isAttachment().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:33 2010 for Second Life Viewer by  doxygen 1.4.7