![]() |
VR-Forces 5.0.1 Developer's Guide
|
Service which provides managed lists of simulation objects that are filtered based on a given predicate. These lists can be updated periodically as objects change and get added/removed from the scenario. Use getList() to retrieve a new managed list.
Public Member Functions | |
| DtManagedObjectListManager (const DtSimulationServices *services) | |
| virtual | ~DtManagedObjectListManager () |
| virtual void | init () |
| DtManagedObjectListConstPtr | getList (const DtVrfObjectPredicate &predicate=DtVrfObjectPredicate::nullPredicate(), bool reevaluateFlag=false, DtTime evaluationPeriod=0) |
| DtManagedObjectListConstPtr | nullList () |
| virtual void | printCurrentLists () |
| virtual void | tick (DtVrfCallbackQueue *=0) |
Protected Types | |
| typedef std::list < DtBoost::weak_ptr < DtManagedObjectList > > | DtManagedObjectListStdList |
Protected Member Functions | |
| DtManagedObjectListManager () | |
| void | removeExpiredLists () |
Protected Attributes | |
| const DtSimulationServices * | mySimulationServices |
| tbb::spin_mutex | myListsMutex |
| DtManagedObjectListStdList | myLists |
| std::list< DtConsoleCommand * > | myConsoleCommands |
|
protected |
|
protected |
Default constructor; do not call.
| DtManagedObjectListManager::DtManagedObjectListManager | ( | const DtSimulationServices * | services | ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
| DtManagedObjectListConstPtr DtManagedObjectListManager::getList | ( | const DtVrfObjectPredicate & | predicate = DtVrfObjectPredicate::nullPredicate(), |
| bool | reevaluateFlag = false, |
||
| DtTime | evaluationPeriod = 0 |
||
| ) |
Returns a list based on the given predicate which gets evaluated at the given evaluationPeriod. Lists are returned inside shared pointers. The manager will hand out pointers to the same list to multiple requesters of the same list. The list will be deleted when all shared pointers go out of scope. This function can be called from thread safe components.
| DtManagedObjectListConstPtr DtManagedObjectListManager::nullList | ( | ) |
Return an empty list.
|
virtual |
Prints the string reps for the predicates of the current lists to DtInfo.
|
virtual |
Ticks lists that are re-evaluated. If queue is given runs in parallel.
|
protected |
Removes any expired elements from myLists. These are elements that no longer have any references outside this class, and have been deleted by shared_ptr.
|
protected |
|
mutableprotected |
|
protected |
|
protected |