![]() |
VR-Forces Developer's Guide
|
This is a convenience list that will add DtSimObjectReference objects and modify the list as objects are deleted. Note that if the sim object manager is not supplied, this will be a static list and will be up to the user to, when iterating over the list, determine if the object is valid or not. If the sim object manager is not supplied the addUUID method will throw an exception for an unimplemented method Lists that are assigned via the assignment operator will not keep track of the goings of objects in the list.
Note that the adding of a UUID to this list does not mean the DtSimObjectReference will be valid when looked it (it might not have been discovered yet), so, when iterating over the list and using the DtSimObjectReference, best to check with isValid()
Classes | |
| struct | ObjectInformation |
Public Types | |
| typedef std::list < DtSimObjectReference > | SimObjectReferenceList |
| typedef std::list < DtSimObjectReference > ::iterator | iterator |
| typedef std::list < DtSimObjectReference > ::const_iterator | const_iterator |
| typedef std::list < DtSimObjectReference > ::reverse_iterator | reverse_iterator |
| typedef std::list < DtSimObjectReference > ::const_reverse_iterator | const_reverse_iterator |
Public Attributes | |
| boost::signals2::signal< void(const DtUUID &)> | signal_simObjectRemoved |
Protected Types | |
| typedef std::map< DtString, ObjectInformation > | QuickLookupMap |
Protected Member Functions | |
| void | simObjectRemoved (const DtSimObject *) |
Protected Attributes | |
| QuickLookupMap | myQuickLookupMap |
| const DtSimulationServices * | mySimulationServices |
| bool | myConnectedForRemoval |
| SimObjectReferenceList | mySimObjectReferenceList |
| tbb::spin_rw_mutex | myQuickLookupMapMutex |
| tbb::spin_mutex | mySimObjectReferenceListMutex |
| typedef std::list<DtSimObjectReference> DtSimObjectReferenceList::SimObjectReferenceList |
| typedef std::list<DtSimObjectReference>::iterator DtSimObjectReferenceList::iterator |
| typedef std::list<DtSimObjectReference>::const_iterator DtSimObjectReferenceList::const_iterator |
| typedef std::list<DtSimObjectReference>::reverse_iterator DtSimObjectReferenceList::reverse_iterator |
| typedef std::list<DtSimObjectReference>::const_reverse_iterator DtSimObjectReferenceList::const_reverse_iterator |
|
protected |
| DtSimObjectReferenceList::DtSimObjectReferenceList | ( | const DtSimulationServices * | mgr = 0 | ) |
| DtSimObjectReferenceList::DtSimObjectReferenceList | ( | const DtSimObjectReferenceList & | orig | ) |
|
virtual |
Will keep track of the goings of this object in the list. This call is not thread safe, so, lock around this call if you think this is called in multiple threads.
| void DtSimObjectReferenceList::add | ( | DtSimObjectReference | , |
| int | index = -1 |
||
| ) |
| DtSimObjectReferenceList& DtSimObjectReferenceList::operator= | ( | const DtSimObjectReferenceList & | orig | ) |
The remove UUID will also remove a UUID from the list. If it is not found in the quick lookup map it will iterate over the list to find the item and remove it. This call is not thread safe, so, lock around this call if you think this is called in multiple threads.
| bool DtSimObjectReferenceList::remove | ( | DtSimObjectReference | ) |
| void DtSimObjectReferenceList::clear | ( | ) |
| int DtSimObjectReferenceList::size | ( | ) | const |
Number of items in the list.
|
virtual |
Disconnect from current and furture removals. Call connect() to turn back on.
|
virtual |
|
virtual |
Copies the list and turns off connections.
| DtSimObjectReference DtSimObjectReferenceList::simObject | ( | const DtUUID & | ) | const |
|
inline |
| const SimObjectReferenceList& DtSimObjectReferenceList::simObjectReferenceList | ( | ) | const |
Accessors.
| iterator DtSimObjectReferenceList::begin | ( | ) |
| iterator DtSimObjectReferenceList::end | ( | ) |
| const_iterator DtSimObjectReferenceList::begin | ( | ) | const |
| const_iterator DtSimObjectReferenceList::end | ( | ) | const |
| reverse_iterator DtSimObjectReferenceList::rbegin | ( | ) |
| reverse_iterator DtSimObjectReferenceList::rend | ( | ) |
| const_reverse_iterator DtSimObjectReferenceList::rbegin | ( | ) | const |
| const_reverse_iterator DtSimObjectReferenceList::rend | ( | ) | const |
| iterator DtSimObjectReferenceList::insert | ( | iterator | , |
| DtSimObjectReference | |||
| ) |
| void DtSimObjectReferenceList::erase | ( | iterator | ) |
|
protected |
|
mutable |
Signal sent when an object is removed either by directly calling removeUUID or when the object is deleted.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |