![]() |
VR-Forces 4.3.1 Class Documentation
|
This class derives from the DtOrganizationView, and adds the capability to manipulate the hierarchy. More...

Public Types | |
| typedef DtCallbackList< const DtOrganizationManagerReadyCallbackInfo & > | DtOrganizationReadyCallbackList |
Public Member Functions | |
| DtOrganizationManager (DtVrfObjectManager *objMgr) | |
| Constructor. | |
| virtual | ~DtOrganizationManager () |
| Destructor. | |
| virtual bool | init () |
| virtual DtOrganizationManagerNode * | addEntity (DtVrfObject *vrfObject) |
| ! Functions for manipulating the hierarchy | |
| virtual void | removeEntity (DtVrfObject *vrfObject) |
| Overridden to run pending operations after the remove. | |
| virtual void | updateAggregate (DtVrfObject *vrfObject) |
| Overridden to run pending operations after the update. | |
| virtual void | updateEntity (DtVrfObject *vrfObject) |
| Overridden to run pending operations after the update. | |
| virtual void | setSuperior (const DtEntityIdentifier &subordinateId, const DtEntityIdentifier &superiorId, int designator=0, bool localOnly=false) |
| Queues operations to add a subordinate to a non-force level superior. | |
| virtual void | setSuperiorToForce (const DtEntityIdentifier &subordinateId, int designator=0, bool localOnly=false) |
| Queues operations to add a subordinate to it's force level superior. | |
| virtual void | queueSetSuperior (const DtString &subordinateName, const DtString &superiorName, int designator=0, DtOrganizationManagerCallbackFcn completionCallback=0, void *usrData=0) |
| Queues an operator to set superior when both the subordinate and the superior exist in the organization hierarchy. | |
| virtual void | queueSetSuperiorToForce (const DtString &subordinateName, int designator=0, DtOrganizationManagerCallbackFcn completionCallback=0, void *usrData=0) |
| Queues an operator to set superior to force when both the subordinate and the superior exist in the organization hierarchy. | |
| virtual void | queueChangeSet (const DtOrganizationChangeSet &changeSet, int &changeSetRequestId, DtOrganizationManagerCallbackFcn completionCallback=0, void *usrData=0) |
| Queues a set of organization change operations specified in changeSet. | |
| virtual void | removeChangeSetCallback (int changeSetRequestId, DtOrganizationManagerCallbackFcn completionCallback, void *usrData=0) |
| virtual void | detatchFromSuperior (const DtEntityIdentifier &subordinateId, bool localOnly=false) |
| Queues operations to detach a subordinate from its superior. | |
| virtual void | setSubordinateOrder (const DtEntityIdentifier &superiorId, const std::vector< DtEntityIdentifier > &orderedSubordinateList, bool localOnly=false) |
| Set order of subordinates belonging to the given superior, according to the order in the given list. | |
| virtual void | processObjectAboutToBeRemoved () |
| virtual bool | allLocalOrgChangesComplete () const |
| virtual bool | hasPendingOperations () const |
| Returns true if there are any pending operations. | |
| virtual void | addOrganizationManagerReadyCallback (DtOrganizationManagerReadyCallbackFcn fcn, void *usrData) |
| Add callback to be invoked when the organization manager readiness changes. | |
| virtual void | removeOrganizationManagerReadyCallback (DtOrganizationManagerReadyCallbackFcn fcn, void *usrData) |
| Removes callback to be invoked when the organization manager readiness changes. | |
| virtual void | runPendingOperations () |
| Executes all of the pending operations. | |
| virtual void | printPendingOperations () const |
| virtual void | deletePendingOperations () |
| virtual void | deletePendingOperationsFor (DtString objectName) |
| virtual void | updateObjectIndex () |
| virtual bool | objectExistsInIndexByName (const DtString &name, DtString &simAddress, DtString &objectId) |
| Returns true if the object with the given name exists on another sim engine. | |
| virtual bool | objectExistsInIndexByGlobalId (const DtString &globalId, DtString &simAddress) |
| Returns true if the object with the given globalId exists on another sim engine. | |
Public Member Functions inherited from DtOrganizationView | |
| DtOrganizationView (DtVrfObjectManager *objMgr) | |
| Constructor. | |
| virtual | ~DtOrganizationView () |
| Destructor. | |
| 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 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. | |
| 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) |
| virtual const DtHashList & | nodes () const |
Static Public Member Functions | |
| static void | addToOrganizationCallback (DtSimMessage *msg, void *usr) |
| static void | removeFromOrganizationCallback (DtSimMessage *msg, void *usr) |
| static void | objectAboutToBeRemovedCallback (DtVrfObject *vrfObject, void *usr) |
| Registered with the objectManager's objectAboutToBeRemoved callback list. | |
Static Public Member Functions inherited from DtOrganizationView | |
| static void | vrfObjectAddedCallback (DtVrfObject *vrfObject, void *usr) |
| static void | vrfObjectAboutToBeRemovedCallback (DtVrfObject *vrfObject, void *usr) |
| static bool | isTopLevelEntity (const DtEntityType &objectType) |
| Methods mainly used internally. | |
| static bool | isOrganizedAggregate (DtVrfObject *vrfObject) |
| static bool | isOrganizedEntity (DtVrfObject *vrfObject) |
Protected Types | |
| typedef std::pair < DtOrganizationManager *, unsigned int > | DtPendingOperationCompletionCallbackData |
| Structure used in the userData field of the pending operation callbacks. | |
Protected Types inherited from DtOrganizationView | |
| typedef std::list < DtEntityIdentifierCallbackInfo > | DtEntityIdentifierCallbackInfoList |
Protected Member Functions | |
| virtual void | invokeOrganizationManagerReadyCallbacks () |
| Called when organization manager ready state has changed. | |
| virtual void | processAddToOrganization (DtSimMessage *msg) |
| virtual void | processRemoveFromOrganization (DtSimMessage *msg) |
| virtual bool | setSuperiorIsLocal (const DtEntityIdentifier &subordinateId, const DtEntityIdentifier &superiorId) |
| Returns true if the entire equivalent setSuperior call can be completed locally. | |
| virtual bool | setSuperiorToForceIsLocal (const DtEntityIdentifier &subordinateId) |
| Returns true if the entire equivalent setSuperiorToForce can be completed locally. | |
| virtual bool | detatchFromSuperiorIsLocal (const DtEntityIdentifier &subordinateId) |
| Returns true if the entire equivalent detach call can be completed locally. | |
| virtual bool | setSubordinateOrderIsLocal (const DtEntityIdentifier &superiorId) const |
| Returns true if setSubordinateOrder call can be completed locally. | |
| virtual void | addOperationToQueue (DtOrgManagerOperation *operation) |
| Adds the specified operation to the queue. | |
| virtual unsigned int | newPendingOperationId () |
| Inserts the next pending operation ID onto the pending list, and returns that same ID. | |
| virtual void | clearPendingOperationId (unsigned int id) |
Protected Member Functions inherited from DtOrganizationView | |
| 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. | |
Static Protected Member Functions | |
| static void | pendingOperationCompleteCallback (void *usr) |
| static int | nextId () |
Static Protected Attributes | |
| static int | theNextId |
Private Member Functions | |
| DtOrganizationManager () | |
| Default constructor not implemented. | |
| DtOrganizationManager (const DtOrganizationManager &orig) | |
| Copy constructor not implemented. | |
| DtOrganizationManager & | operator= (const DtOrganizationManager &orig) |
| Assignment operator not implemented. | |
| virtual void | processObjectIndexMessage (DtSimInterfaceMessage *msg) |
| Update local cached object index based on new message. | |
| static void | objectIndexMessageCallback (DtSimMessage *msg, void *usr) |
| Update local cached object index based on new message. | |
This class derives from the DtOrganizationView, and adds the capability to manipulate the hierarchy.
Remember that the organization view is solely based off of what is heard over the network, and the manipulation that occurs on the org manager level changes the subordinate lists of local entites (and remotes by sending messages to the org manager on the backend simulating them). Because of this, changes made to the organization hierarchy through these calls will not be seen immediately in the organization view.
| typedef DtCallbackList<const DtOrganizationManagerReadyCallbackInfo&> DtOrganizationManager::DtOrganizationReadyCallbackList |
|
protected |
Structure used in the userData field of the pending operation callbacks.
|
private |
Default constructor not implemented.
|
private |
Copy constructor not implemented.
| DtOrganizationManager::DtOrganizationManager | ( | DtVrfObjectManager * | objMgr | ) |
Constructor.
|
virtual |
Destructor.
|
private |
Assignment operator not implemented.
|
virtual |
Reimplemented from DtOrganizationView.
|
virtual |
! Functions for manipulating the hierarchy
Overridden to run pending operations after the add.
Reimplemented from DtOrganizationView.
|
virtual |
Overridden to run pending operations after the remove.
Reimplemented from DtOrganizationView.
|
virtual |
Overridden to run pending operations after the update.
Reimplemented from DtOrganizationView.
|
virtual |
Overridden to run pending operations after the update.
Reimplemented from DtOrganizationView.
|
virtual |
Queues operations to add a subordinate to a non-force level superior.
An implicit detach is included in this call. if localOnly is false, a message will be sent to all backends if the operation cannot be complete locally.
|
virtual |
Queues operations to add a subordinate to it's force level superior.
An implicit detach is included in this call. If localOnly is false, a message will be sent to all backends if the operation cannot be completed locally.
|
virtual |
Queues an operator to set superior when both the subordinate and the superior exist in the organization hierarchy.
If necessary, messages will be sent to other backends to complete the operation once the objects exist. Optionally takes a completion callback function pointer and user data as an argument. This callback will be invoked onces the setSuperior operation has successfully completed.
|
virtual |
Queues an operator to set superior to force when both the subordinate and the superior exist in the organization hierarchy.
If necessary, messages will be sent to other backends to complete the operation once the objects exist. Optionally takes a completion callback function pointer and user data as an argument. This callback will be invoked onces the setSuperior operation has successfully completed.
|
virtual |
Queues a set of organization change operations specified in changeSet.
Optionally takes a completion callback function pointer and user data as an argument. This callback will be invoked onces the entire change set has successfully completed.
|
virtual |
|
virtual |
Queues operations to detach a subordinate from its superior.
if localOnly is false, a message will be sent to other backends if the operation cannot be completed locally.
|
virtual |
Set order of subordinates belonging to the given superior, according to the order in the given list.
|
static |
|
static |
|
static |
Registered with the objectManager's objectAboutToBeRemoved callback list.
Forces the object index to update the next time updateObjectIndex is called.
|
virtual |
|
virtual |
|
virtual |
Returns true if there are any pending operations.
|
virtual |
Add callback to be invoked when the organization manager readiness changes.
|
virtual |
Removes callback to be invoked when the organization manager readiness changes.
|
virtual |
Executes all of the pending operations.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Returns true if the object with the given name exists on another sim engine.
simAddress is set to the sim address of the object, and objectId is set to the objectId of the object.
|
virtual |
Returns true if the object with the given globalId exists on another sim engine.
simAddress is set to the sim address of the object.
|
static |
Update local cached object index based on new message.
Ignores messages sent from ourselves.
|
virtual |
Update local cached object index based on new message.
Ignores messages sent from ourselves.
|
protectedvirtual |
Called when organization manager ready state has changed.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Returns true if the entire equivalent setSuperior call can be completed locally.
|
protectedvirtual |
Returns true if the entire equivalent setSuperiorToForce can be completed locally.
|
protectedvirtual |
Returns true if the entire equivalent detach call can be completed locally.
|
protectedvirtual |
Returns true if setSubordinateOrder call can be completed locally.
|
protectedvirtual |
Adds the specified operation to the queue.
The queue will delete this object when it is done with it. Please don't keep a pointer to it.
|
protectedvirtual |
Inserts the next pending operation ID onto the pending list, and returns that same ID.
|
protectedvirtual |
|
staticprotected |
|
staticprotected |
|
protected |
List of DtOrgManagerOperations which have not been successfully executed yet.
|
protected |
Flag to prevent reentrance of runPendingOperations.
|
protected |
|
protected |
|
protected |
|
protected |
Maps sim address as a DtString to a map of object names to their respective global Ids.
|
protected |
Maps sim address as a DtString to a set of global ids as strings.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |