![]() |
VR-Forces 4.0.4 Class Documentation
|
This class maintains a hierarchy of the existing organized entities for a simulation based on the contents of Aggregate State PDUs. More...

Public Member Functions | |
| DtOrganizationView (DtVrfObjectManager *objMgr) | |
| Constructor. | |
| virtual | ~DtOrganizationView () |
| Destructor. | |
| virtual bool | init () |
| virtual DtOrgViewManagedObjectListConstPtr | getList (const DtEntityIdentifier &aggregateId, const DtVrfObjectPredicate &predicate=DtVrfObjectPredicate::nullPredicate(), bool reevaluateFlag=false, DtTime evaluationPeriod=0.) const |
| Request a filtered list of subordinates for a given aggregate, based on user-supplied criteria. | |
| virtual DtOrganizationManagerNode * | lookupNode (const DtEntityIdentifier &id) const |
| Methods for inspecting the hierarchy. | |
| virtual bool | isSubordinateOfTopLevel (const DtEntityIdentifier &id) const |
| virtual const DtEntityIdentifier & | superior (const DtEntityIdentifier &id) const |
| virtual DtVrfObject * | superiorVrfObject (const DtEntityIdentifier &id) const |
| virtual bool | isSubordinateOf (const DtEntityIdentifier &subordinateId, const DtEntityIdentifier &superiorId) const |
| virtual DtOrganizationManagerNode * | addEntity (DtVrfObject *vrfObject) |
| Functions for manipulating the hierarchy. | |
| virtual void | removeEntity (DtVrfObject *vrfObject) |
| Removes the node for this entity from the hierarchy. | |
| virtual void | updateAggregate (DtVrfObject *vrfObject) |
| Updates the connections to the node corresponding to this aggregate. | |
| virtual void | updateEntity (DtVrfObject *vrfObject) |
| Updates the connections to the node corresponding to this entity. | |
| virtual void | addNodeAddedCallback (DtEntityIdentifierCallbackFunction fcn, void *userData) |
| Callback for notification when a child is added to the list of child nodes. | |
| virtual void | removeNodeAddedCallback (DtEntityIdentifierCallbackFunction fcn, void *userData) |
| Callback for notification when a child is added to the list of child nodes. | |
| virtual void | addNodeRemovedCallback (DtEntityIdentifierCallbackFunction fcn, void *userData) |
| Callback for notification when a child is about to be removed from the list of child nodes. | |
| virtual void | removeNodeRemovedCallback (DtEntityIdentifierCallbackFunction fcn, void *userData) |
| Callback for notification when a child is about to be removed from the list of child nodes. | |
Static Public Member Functions | |
| static void | vrfObjectAddedCallback (DtVrfObject *vrfObject, void *usr) |
| static void | vrfObjectAboutToBeRemovedCallback (DtVrfObject *vrfObject, void *usr) |
Protected Types | |
| typedef std::list < DtEntityIdentifierCallbackInfo > | DtEntityIdentifierCallbackInfoList |
Protected Member Functions | |
| DtOrganizationView (const DtOrganizationView &orig) | |
| Copy constructor not implemented. | |
| DtOrganizationView & | operator= (const DtOrganizationView &orig) |
| Assignment operator not implemented. | |
| virtual void | processVrfObjectAdded (DtVrfObject *vrfObject) |
| virtual void | processVrfObjectAboutToBeRemoved (DtVrfObject *vrfObject) |
| Looks up vrfObject's superior. | |
| virtual bool | shouldBeAdded (DtVrfObject *vrfObject) const |
| virtual void | findAndConnectNodeParent (DtOrganizationManagerNode *node) |
| Searches the existing hierarchy for an aggregate which claims this node, and connects it as a child. | |
| virtual void | disconnectNodeParent (DtOrganizationManagerNode *node) |
| Removes the specified node from the child list of it's current parent, and sets it parent to NULL. | |
| virtual void | findAndConnectNodeChildren (DtOrganizationManagerNode *node) |
| Looks up this vrfObject, and searches the existing hierarchy for any nodes specified in the subordinate manger of this object and connects them to this node as children. | |
| virtual void | disconnectNodeChildren (DtOrganizationManagerNode *node) |
| Disconnects all the children from this node. | |
| virtual void | connectNodeToTopLevel (DtOrganizationManagerNode *node, bool allowCreation=true) |
| Makes this node a child of the top level node corresponding to its force type. | |
| virtual void | printNode (DtOrganizationManagerNode *node, int indentLevel=0) const |
| Prints a node and all it's children recursively. | |
| virtual bool | networkStateIsDifferentFromLocalState (const DtOrganizationManagerNode &node) const |
| virtual void | invokeNodeAddedCallbacks (const DtEntityIdentifier &entId) const |
| Invokes all callbacks registered for notification that a node has been added. | |
| virtual void | invokeNodeRemovedCallbacks (const DtEntityIdentifier &entId) const |
| Invokes all callbacks registered for notification that a node is about to be removed. | |
Protected Attributes | |
| DtVrfObjectManager * | myObjectManager |
| DtHashList | myTopLevelNodes |
| Hash list of top level nodes hashed by force type. (. | |
| DtHashList | myIdHashList |
| Hash list associating entity identifiers with nodes. | |
| DtEntityIdentifierCallbackInfoList | myNodeAddedCallbackList |
| DtEntityIdentifierCallbackInfoList | myNodeRemovedCallbackList |
| DtOrgViewManagedObjectListManager * | myManagedObjectListManager |
| virtual DtOrganizationManagerNode * | locateSuperiorNodeForGlobalId (const DtGlobalObjectDesignator &globalId) const |
| Methods mainly used internally. | |
| virtual bool | isLocal (DtOrganizationManagerNode *node) const |
| virtual void | printHierarchy () const |
| Prints a text representation of the current hierarchy for debugging. | |
| virtual DtVrfObjectManager * | objectManager () |
| Methods mainly used internally. | |
| virtual DtVrfObject * | topLevelObjectForForce (const DtForceType &force) |
| virtual DtOrganizationManagerNode * | topLevelNodeForForce (DtForceType force) |
| static bool | isTopLevelEntity (const DtEntityType &objectType) |
| Methods mainly used internally. | |
| static bool | isOrganizedAggregate (DtVrfObject *vrfObject) |
| static bool | isOrganizedEntity (DtVrfObject *vrfObject) |
This class maintains a hierarchy of the existing organized entities for a simulation based on the contents of Aggregate State PDUs.
It is the central point for making inquiries about the organization of entities in the simulation.
typedef std::list<DtEntityIdentifierCallbackInfo> DtOrganizationView::DtEntityIdentifierCallbackInfoList [protected] |
| DtOrganizationView::DtOrganizationView | ( | const DtOrganizationView & | orig | ) | [protected] |
Copy constructor not implemented.
Constructor.
| objMgr | The object manager that maintains the list of all entities and objects in the simulation. |
| virtual DtOrganizationView::~DtOrganizationView | ( | ) | [virtual] |
Destructor.
| DtOrganizationView& DtOrganizationView::operator= | ( | const DtOrganizationView & | orig | ) | [protected] |
Assignment operator not implemented.
| virtual bool DtOrganizationView::init | ( | ) | [virtual] |
Reimplemented in DtOrganizationManager.
| virtual DtOrganizationManagerNode* DtOrganizationView::lookupNode | ( | const DtEntityIdentifier & | id | ) | const [virtual] |
Methods for inspecting the hierarchy.
| virtual bool DtOrganizationView::isSubordinateOfTopLevel | ( | const DtEntityIdentifier & | id | ) | const [virtual] |
| virtual const DtEntityIdentifier& DtOrganizationView::superior | ( | const DtEntityIdentifier & | id | ) | const [virtual] |
| virtual DtVrfObject* DtOrganizationView::superiorVrfObject | ( | const DtEntityIdentifier & | id | ) | const [virtual] |
| virtual bool DtOrganizationView::isSubordinateOf | ( | const DtEntityIdentifier & | subordinateId, |
| const DtEntityIdentifier & | superiorId | ||
| ) | const [virtual] |
| virtual DtOrganizationManagerNode* DtOrganizationView::addEntity | ( | DtVrfObject * | vrfObject | ) | [virtual] |
Functions for manipulating the hierarchy.
Creates and adds a new node for this entity.
Reimplemented in DtOrganizationManager.
| virtual void DtOrganizationView::removeEntity | ( | DtVrfObject * | vrfObject | ) | [virtual] |
Removes the node for this entity from the hierarchy.
Reimplemented in DtOrganizationManager.
| virtual void DtOrganizationView::updateAggregate | ( | DtVrfObject * | vrfObject | ) | [virtual] |
Updates the connections to the node corresponding to this aggregate.
Reimplemented in DtOrganizationManager.
| virtual void DtOrganizationView::updateEntity | ( | DtVrfObject * | vrfObject | ) | [virtual] |
Updates the connections to the node corresponding to this entity.
Reimplemented in DtOrganizationManager.
| virtual DtOrgViewManagedObjectListConstPtr DtOrganizationView::getList | ( | const DtEntityIdentifier & | aggregateId, |
| const DtVrfObjectPredicate & | predicate = DtVrfObjectPredicate::nullPredicate(), |
||
| bool | reevaluateFlag = false, |
||
| DtTime | evaluationPeriod = 0. |
||
| ) | const [virtual] |
Request a filtered list of subordinates for a given aggregate, based on user-supplied criteria.
The list returned is a shared pointer, and may be used by other requesters of the same list. The list will be released when all references go out of scope.
| virtual DtOrganizationManagerNode* DtOrganizationView::locateSuperiorNodeForGlobalId | ( | const DtGlobalObjectDesignator & | globalId | ) | const [virtual] |
Methods mainly used internally.
Searches the current nodes for an aggregate which is claiming the specified global ID as it's subordinate, and returns that node.
| virtual bool DtOrganizationView::isLocal | ( | DtOrganizationManagerNode * | node | ) | const [virtual] |
| virtual void DtOrganizationView::printHierarchy | ( | ) | const [virtual] |
Prints a text representation of the current hierarchy for debugging.
| virtual DtVrfObjectManager* DtOrganizationView::objectManager | ( | ) | [virtual] |
Methods mainly used internally.
Searches the current nodes for an aggregate which is claiming the specified global ID as it's subordinate, and returns that node.
| virtual DtVrfObject* DtOrganizationView::topLevelObjectForForce | ( | const DtForceType & | force | ) | [virtual] |
| virtual DtOrganizationManagerNode* DtOrganizationView::topLevelNodeForForce | ( | DtForceType | force | ) | [virtual] |
| static bool DtOrganizationView::isTopLevelEntity | ( | const DtEntityType & | objectType | ) | [static] |
Methods mainly used internally.
Searches the current nodes for an aggregate which is claiming the specified global ID as it's subordinate, and returns that node.
| static bool DtOrganizationView::isOrganizedAggregate | ( | DtVrfObject * | vrfObject | ) | [static] |
| static bool DtOrganizationView::isOrganizedEntity | ( | DtVrfObject * | vrfObject | ) | [static] |
| static void DtOrganizationView::vrfObjectAddedCallback | ( | DtVrfObject * | vrfObject, |
| void * | usr | ||
| ) | [static] |
| static void DtOrganizationView::vrfObjectAboutToBeRemovedCallback | ( | DtVrfObject * | vrfObject, |
| void * | usr | ||
| ) | [static] |
| virtual void DtOrganizationView::addNodeAddedCallback | ( | DtEntityIdentifierCallbackFunction | fcn, |
| void * | userData | ||
| ) | [virtual] |
Callback for notification when a child is added to the list of child nodes.
| virtual void DtOrganizationView::removeNodeAddedCallback | ( | DtEntityIdentifierCallbackFunction | fcn, |
| void * | userData | ||
| ) | [virtual] |
Callback for notification when a child is added to the list of child nodes.
| virtual void DtOrganizationView::addNodeRemovedCallback | ( | DtEntityIdentifierCallbackFunction | fcn, |
| void * | userData | ||
| ) | [virtual] |
Callback for notification when a child is about to be removed from the list of child nodes.
| virtual void DtOrganizationView::removeNodeRemovedCallback | ( | DtEntityIdentifierCallbackFunction | fcn, |
| void * | userData | ||
| ) | [virtual] |
Callback for notification when a child is about to be removed from the list of child nodes.
| virtual void DtOrganizationView::processVrfObjectAdded | ( | DtVrfObject * | vrfObject | ) | [protected, virtual] |
| virtual void DtOrganizationView::processVrfObjectAboutToBeRemoved | ( | DtVrfObject * | vrfObject | ) | [protected, virtual] |
Looks up vrfObject's superior.
If it exists, removes vrfObject from superior's subordinate manager. Then calls removeEntity().
| virtual bool DtOrganizationView::shouldBeAdded | ( | DtVrfObject * | vrfObject | ) | const [protected, virtual] |
| virtual void DtOrganizationView::findAndConnectNodeParent | ( | DtOrganizationManagerNode * | node | ) | [protected, virtual] |
Searches the existing hierarchy for an aggregate which claims this node, and connects it as a child.
| virtual void DtOrganizationView::disconnectNodeParent | ( | DtOrganizationManagerNode * | node | ) | [protected, virtual] |
Removes the specified node from the child list of it's current parent, and sets it parent to NULL.
| virtual void DtOrganizationView::findAndConnectNodeChildren | ( | DtOrganizationManagerNode * | node | ) | [protected, virtual] |
Looks up this vrfObject, and searches the existing hierarchy for any nodes specified in the subordinate manger of this object and connects them to this node as children.
| virtual void DtOrganizationView::disconnectNodeChildren | ( | DtOrganizationManagerNode * | node | ) | [protected, virtual] |
Disconnects all the children from this node.
| virtual void DtOrganizationView::connectNodeToTopLevel | ( | DtOrganizationManagerNode * | node, |
| bool | allowCreation = true |
||
| ) | [protected, virtual] |
Makes this node a child of the top level node corresponding to its force type.
If allowCreation is true, this function will create the appropriate top level entity if it doesn't already exist.
| virtual void DtOrganizationView::printNode | ( | DtOrganizationManagerNode * | node, |
| int | indentLevel = 0 |
||
| ) | const [protected, virtual] |
Prints a node and all it's children recursively.
| virtual bool DtOrganizationView::networkStateIsDifferentFromLocalState | ( | const DtOrganizationManagerNode & | node | ) | const [protected, virtual] |
| virtual void DtOrganizationView::invokeNodeAddedCallbacks | ( | const DtEntityIdentifier & | entId | ) | const [protected, virtual] |
Invokes all callbacks registered for notification that a node has been added.
| virtual void DtOrganizationView::invokeNodeRemovedCallbacks | ( | const DtEntityIdentifier & | entId | ) | const [protected, virtual] |
Invokes all callbacks registered for notification that a node is about to be removed.
DtVrfObjectManager* DtOrganizationView::myObjectManager [protected] |
DtHashList DtOrganizationView::myTopLevelNodes [protected] |
Hash list of top level nodes hashed by force type. (.
DtHashList DtOrganizationView::myIdHashList [protected] |
Hash list associating entity identifiers with nodes.