![]() |
VR-Forces 4.6.1 Class Documentation
|
Description: Objects may contain a collection of other objects, such as overlays or pseudo-aggregate entities. More...

Public Member Functions | |
| DtSubordinateManager (DtSimManager *simObjectManager) | |
| Constructor. | |
| DtSubordinateManager (const DtSubordinateManager &orig) | |
| Copy Constructor. | |
| const DtSubordinateManager & | operator= (const DtSubordinateManager &orig) |
| Assignment Operator. | |
| virtual | ~DtSubordinateManager () |
| Destructor. | |
| virtual DtSubordinateManager * | clone () const |
| Creates a new manager calling the copy constructor and returns the result. | |
| virtual bool | addSubordinate (DtVrfObject *subordinate, int designator=0) |
| All adding subordinate calls will fail if the specified designator is already in use. | |
| virtual bool | addSubordinateBefore (DtVrfObject *subordinate, DtVrfObject *beforeObject, int designator=0) |
| If designator is 0 will call resetDesignatorsToSubordinateOrder as a side effect. | |
| virtual bool | addSubordinateAfter (DtVrfObject *subordinate, DtVrfObject *afterObject, int designator=0) |
| note that if the afterObject is not found, the object is added to the end of the list. | |
| virtual void | removeSubordinate (DtVrfObject *subordinate) |
| Removes given object as a subordinate. | |
| virtual void | removeAllSubordinates () |
| note that if the beforeObject is not found, the object is added to the end of the list | |
| virtual int | numSubordinates () const |
| Returns the number of subrodinates managed by this object. | |
| virtual void | resetDesignatorsToSubordinateOrder () |
| Given the current subordinate order, reset all designators given the order. | |
| virtual DtVrfObject * | firstSubordinate () const |
| useful to be able to get the first or last in the list without needed to spawn an iterator. | |
| virtual DtVrfObject * | lastSubordinate () const |
| virtual bool | isSubordinate (const DtEntityIdentifier &id) const |
| Returns true if this object is listed in this subordinate manager. | |
| virtual bool | isSubordinate (DtVrfObject *simObj) const |
| const DtKeyedVrfObjectIterator & | iterator () const |
| allocates and returns an iterator to iterate over this subObject list. | |
| virtual int | designatorForSubordinate (DtVrfObject *subordinate) const |
| Returns the designator number for a subordinate in the list. | |
| virtual int | designatorForSubordinate (const DtEntityIdentifier &id) const |
| virtual DtVrfObject * | subordinateForDesignator (int designator) const |
| Returns the subordinate with a particular designator. | |
| virtual bool | setDesignator (const DtEntityIdentifier &id, int designator) |
| Sets the designator of a subordinate to the specified value. | |
| virtual bool | setDesignator (DtVrfObject *subordinate, int designator) |
| virtual int | firstAvailableDesignator (int start=1) const |
| Returns the lowest unused designator. | |
| virtual int | maxUsedDesignator () const |
| Returns the highest used designator. | |
| virtual void | reorderToDesignatorOrder () |
| Causes the order of the subordinate list to be in ascending designator order. | |
| virtual void | designatorOrderedList (std::vector< DtEntityIdentifier > &designatorOrderedList) const |
| Returns list of DtEntityIdentifiers, ordered from lowest to highest designator. | |
| virtual void | setSubordinateOrder (const std::vector< DtEntityIdentifier > &orderedList) |
| Removes all subordinates from the subordinate manager and then adds new subordinates in the order given by orderedList. | |
| virtual void | addSubordinatesChangedCallback (DtSubordinateManagerCallbackFcn fcn, void *userData) |
| Registers callback for notification of any change to the subordinates (addition, removal, reordering). | |
| virtual void | removeSubordinatesChangedCallback (DtSubordinateManagerCallbackFcn fcn, void *userData) |
| Removes callback for notification of any change to the subordinates (addition, removal, reordering). | |
| virtual int | nextAvailableDesignator (int cur=0) const |
| Returns the highest next designator based on the designator table and the current designator assigned. | |
Protected Member Functions | |
| void | copySubordinateList (const DtList &list) |
| void | emptySubordinateList () |
| DtListItem * | findSubordinateItem (const DtEntityIdentifier &id) const |
| Searches the list for a given entity id. | |
| virtual void | invokeSubordinatesChangedCallbacks () const |
Protected Attributes | |
| DtSimManager * | mySimObjectManager |
| DtKeyedVrfObjectIterator * | myIterator |
| DtList | mySubordinateList |
| The list of entity id's is kept since order is important. | |
| DtEntityIdIntAssociationList | myDesignatorTable |
| The table of entity id's and designators is used to associate a designator with each entity. | |
| std::vector < DtSubordinateManagerCallbackInfo > | mySubordinatesChangedCallbackList |
| List of DtSubordinateCallbackFcn*s. | |
Private Member Functions | |
| DtSubordinateManager () | |
| Default Constructor. Not implemented. | |
Description: Objects may contain a collection of other objects, such as overlays or pseudo-aggregate entities.
This class defines an interface for maintaining a collection of these subObjects. What's actually stored is a DtList of the object DtEntityIdentifiers. The iterator that can be spawned will iterate through DtEntityIdentifiers, look up the objects in the object mgr. and return pointers to them.
|
private |
Default Constructor. Not implemented.
| DtSubordinateManager::DtSubordinateManager | ( | DtSimManager * | simObjectManager | ) |
Constructor.
| DtSubordinateManager::DtSubordinateManager | ( | const DtSubordinateManager & | orig | ) |
Copy Constructor.
|
virtual |
Destructor.
| const DtSubordinateManager& DtSubordinateManager::operator= | ( | const DtSubordinateManager & | orig | ) |
Assignment Operator.
|
virtual |
Creates a new manager calling the copy constructor and returns the result.
Reimplemented in DtVrfSubordinateManager.
|
virtual |
All adding subordinate calls will fail if the specified designator is already in use.
0 is the only designator which is allowed for multiple subordinates. (0 implies no designator). Adds an object as a subordinate.
|
virtual |
If designator is 0 will call resetDesignatorsToSubordinateOrder as a side effect.
|
virtual |
note that if the afterObject is not found, the object is added to the end of the list.
If designator is 0 will call resetDesignatorsToSubordinateOrder as a side effect
|
virtual |
Removes given object as a subordinate.
|
virtual |
note that if the beforeObject is not found, the object is added to the end of the list
|
virtual |
Returns the number of subrodinates managed by this object.
|
virtual |
Given the current subordinate order, reset all designators given the order.
|
virtual |
useful to be able to get the first or last in the list without needed to spawn an iterator.
|
virtual |
|
virtual |
Returns true if this object is listed in this subordinate manager.
|
virtual |
| const DtKeyedVrfObjectIterator& DtSubordinateManager::iterator | ( | ) | const |
allocates and returns an iterator to iterate over this subObject list.
It is the responsibility of the caller to delete this iterator when finished with it.
|
virtual |
Returns the designator number for a subordinate in the list.
Note that 0 is the only designator more than one entity can have.
|
virtual |
|
virtual |
Returns the subordinate with a particular designator.
Does not work for designator = 0
|
virtual |
Sets the designator of a subordinate to the specified value.
This call will fail (and return false) if the specified designator is already in use. 0 is the only designator that can be used by more that one subordinate.
|
virtual |
Returns the lowest unused designator.
|
virtual |
Returns the highest used designator.
(there may be holes in the sequence)
|
virtual |
Causes the order of the subordinate list to be in ascending designator order.
Any with no designator (designator = 0) will appear in an undefined order at the end of the list.
|
virtual |
Returns list of DtEntityIdentifiers, ordered from lowest to highest designator.
|
virtual |
Removes all subordinates from the subordinate manager and then adds new subordinates in the order given by orderedList.
|
virtual |
Registers callback for notification of any change to the subordinates (addition, removal, reordering).
|
virtual |
Removes callback for notification of any change to the subordinates (addition, removal, reordering).
Returns the highest next designator based on the designator table and the current designator assigned.
|
protected |
|
protected |
|
protected |
Searches the list for a given entity id.
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
The list of entity id's is kept since order is important.
|
protected |
The table of entity id's and designators is used to associate a designator with each entity.
Mutator functions in this class ensure that an entity appears in both lists.
|
protected |
List of DtSubordinateCallbackFcn*s.
Clients register callback functions on this list for notification when the list of subordinates changed for some reason (addition, removal, list ordering).