![]() |
VR-Forces 5.0.1 Developer's Guide
|
Instances of DtManagedObjectList are created and maintained by a DtManagedObjectListManager. The lists contains a subset of the objects in DtSimObjectManager that meet the specified predicate. If specified at creation time, the list automatically updates itself periodically. The lists should be handled though shared pointers.
Classes | |
| struct | ConnectionInformation |
Public Types | |
| typedef std::set < DtSimObjectReference > ::iterator | iterator |
| typedef std::set < DtSimObjectReference > ::const_iterator | const_iterator |
Public Member Functions | |
| DtManagedObjectList (const DtSimulationServices *simServices, const DtVrfObjectPredicate &predicate=DtVrfObjectPredicate::nullPredicate(), bool reevaluateFlag=false, DtTime evaluationPeriod=0) | |
| DtManagedObjectList (const std::vector< DtSimObjectReference > &subordinates, const DtVrfObjectPredicate &predicate) | |
| virtual | ~DtManagedObjectList () |
| virtual const DtVrfObjectPredicate & | predicate () const |
| virtual void | tick () |
| virtual bool | reevaluateFlag () const |
| virtual DtTime | evaluationPeriod () const |
| virtual const DtSimObject * | find (const DtUUID &entityId) const |
| virtual bool | contains (const DtSimObjectReference &simObj) const |
| virtual void | invalidate () |
| double | lastTimeModified () const |
| virtual iterator | begin () |
| virtual const_iterator | begin () const |
| virtual iterator | end () |
| virtual const_iterator | end () const |
| virtual size_t | size () const |
Static Public Member Functions | |
| static DtManagedObjectListPtr | create (const DtSimulationServices *objectManager, const DtVrfObjectPredicate &predicate=DtVrfObjectPredicate::nullPredicate(), bool reevaluatePeriodically=false, DtTime evaluationPeriod=0.0) |
| static DtManagedObjectListPtr | nullList () |
Protected Types | |
| typedef std::map< unsigned long long, ConnectionInformation > | ConnectionMap |
Protected Member Functions | |
| DtManagedObjectList () | |
| virtual void | init () |
| virtual void | init (const std::vector< DtSimObjectReference > &) |
| virtual void | add (DtSimObjectReference obj) |
| virtual void | remove (const DtSimObject *obj) |
| virtual void | populateList () |
| virtual void | simObjectAdded (DtSimObjectReference ref) |
| virtual void | processPredicateCallback (DtSimObjectReference vrfObject, DtVrfObjectPredicateEvaluator *predicateEval) |
| virtual bool | shouldAdd (DtSimObjectReference ref) const |
Static Protected Member Functions | |
| static void | predicateCallback (DtSimObjectReference vrfObject, DtVrfObjectPredicateEvaluator *predicateEval, void *userData) |
Protected Attributes | |
| const DtSimulationServices * | mySimulationServices |
| DtVrfObjectPredicate * | myPredicate |
| DtVrfObjectPredicate * | myNegatedPredicate |
| bool | myReevaluateFlag |
| DtTime | myEvaluationPeriod |
| DtPredicateCallbackManager | myPredicateCallbackManager |
| std::set< DtSimObjectReference > | myFilteredObjectList |
| tbb::spin_mutex | myMutex |
| ConnectionMap | myConnectionMap |
| boost::signals2::scoped_connection | mySimObjectAddedConnection |
| double | myLastTimeModified |
Private Member Functions | |
| DtManagedObjectList (DtManagedObjectList &orig) | |
| DtManagedObjectList & | operator= (DtManagedObjectList &orig) |
| typedef std::set<DtSimObjectReference>::iterator DtManagedObjectList::iterator |
| typedef std::set<DtSimObjectReference>::const_iterator DtManagedObjectList::const_iterator |
|
protected |
|
private |
Not implemented.
|
protected |
Constructor Protected to control creation. Call create() instead.
| DtManagedObjectList::DtManagedObjectList | ( | const DtSimulationServices * | simServices, |
| const DtVrfObjectPredicate & | predicate = DtVrfObjectPredicate::nullPredicate(), |
||
| bool | reevaluateFlag = false, |
||
| DtTime | evaluationPeriod = 0 |
||
| ) |
| DtManagedObjectList::DtManagedObjectList | ( | const std::vector< DtSimObjectReference > & | subordinates, |
| const DtVrfObjectPredicate & | predicate | ||
| ) |
Simple filtered list that is not.
|
virtual |
Destructor.
|
private |
Not implemented.
|
protectedvirtual |
Initializer; called by create() after construction.
|
protectedvirtual |
|
static |
Calls constructor and init().
|
virtual |
Returns the predicate which determines membership in the list.
|
virtual |
Call to run predicate callbacks.
|
virtual |
Returns true if this list get reevaluated.
|
virtual |
Returns the evaluation interval.
|
static |
|
virtual |
Calls down to the corresponding method from contained myFilteredObjectList.
|
virtual |
Calls down to the corresponding method from contained myFilteredObjectList.
|
virtual |
Calls down to the corresponding method from contained myFilteredObjectList.
|
virtual |
Calls down to the corresponding method from contained myFilteredObjectList.
|
virtual |
Calls down to the corresponding method from contained myFilteredObjectList.
|
virtual |
|
virtual |
|
virtual |
Clears out all objects on the list and sets the local object manager pointer to NULL. This is called if the object manager is destroyed before the list is. After calling this, the list will not be able to contain any objects. In general, the user should not call this method. It should only be called the the manager.
|
inline |
The last wall clock time this list was modified (object added or removed)
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Sets up the list with initial contents based on predicate.
|
protectedvirtual |
|
staticprotected |
Object predicate callbacks.
|
protectedvirtual |
|
protectedvirtual |
Some items (like terrain damage) should never be added.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |