![]() |
VR-Forces 4.10 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 Types inherited from DtOrganizationView | |
| typedef boost::unordered_map < DtUUID, DtOrganizationManagerNode * > | UUIDMap |
| typedef boost::unordered_map < int, DtOrganizationManagerNode * > | ForceMap |
Public Member Functions | |
| DtOrganizationManager (DtVrfObjectManager *objMgr) | |
| Constructor. More... | |
| virtual | ~DtOrganizationManager () |
| Destructor. More... | |
| virtual bool | init () |
| virtual DtOrganizationManagerNode * | addEntity (const DtVrfObject *vrfObject) |
| ! Functions for manipulating the hierarchy More... | |
| virtual void | removeEntity (const DtVrfObject *vrfObject) |
| Overridden to run pending operations after the remove. More... | |
| virtual void | updateAggregate (const DtVrfObject *vrfObject) |
| Overridden to run pending operations after the update. More... | |
| virtual void | updateEntity (const DtVrfObject *vrfObject) |
| Overridden to run pending operations after the update. More... | |
| virtual void | setSuperior (const DtUUID &subordinate, const DtUUID &superior, int designator=0, bool localOnly=false) |
| Queues operations to add a subordinate to a non-force level superior. More... | |
| virtual void | setSuperiorToForce (const DtUUID &subordinate, int designator=0, bool localOnly=false) |
| Queues operations to add a subordinate to it's force level superior. More... | |
| virtual void | queueSetSuperior (const DtUUID &subordinate, const DtUUID &superior, 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. More... | |
| virtual void | queueSetSuperiorToForce (const DtUUID &subordinate, 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. More... | |
| virtual void | queueChangeSet (const DtOrganizationChangeSet &changeSet, int &changeSetRequestId, DtOrganizationManagerCallbackFcn completionCallback=0, void *usrData=0) |
| Queues a set of organization change operations specified in changeSet. More... | |
| virtual void | removeChangeSetCallback (int changeSetRequestId, DtOrganizationManagerCallbackFcn completionCallback, void *usrData=0) const |
| virtual void | detatchFromSuperior (const DtUUID &subordinate, bool localOnly=false) |
| Queues operations to detach a subordinate from its superior. More... | |
| virtual void | setSubordinateOrder (const DtUUID &superior, 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. More... | |
| virtual bool | allLocalOrgChangesComplete () const |
| virtual bool | hasPendingOperations () const |
| Returns true if there are any pending operations. More... | |
| virtual void | addOrganizationManagerReadyCallback (DtOrganizationManagerReadyCallbackFcn fcn, void *usrData) |
| Add callback to be invoked when the organization manager readiness changes. More... | |
| virtual void | removeOrganizationManagerReadyCallback (DtOrganizationManagerReadyCallbackFcn fcn, void *usrData) |
| Removes callback to be invoked when the organization manager readiness changes. More... | |
| virtual void | runPendingOperations () |
| Executes all of the pending operations. More... | |
| virtual void | printPendingOperations () const |
| virtual void | deletePendingOperations () |
| virtual void | deletePendingOperationsFor (DtString objectName) |
| int | numberOfOperations () const |
| Number of operations that are pending. More... | |
| virtual void | closingScenario () |
| Called when scenario is closing. Can perform some cleanup. More... | |
Public Member Functions inherited from DtOrganizationView | |
| DtOrganizationView (DtVrfObjectManager *objMgr) | |
| Constructor. More... | |
| virtual | ~DtOrganizationView () |
| Destructor. More... | |
| virtual DtOrgViewManagedObjectListConstPtr | getList (const DtUUID &aggregate, 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. More... | |
| virtual DtOrgViewManagedObjectListConstPtr | nullList () const |
| virtual void | objectUUIDChanged (const DtUUID &oldUUID, const DtUUID &newUUID) |
| Notification that UUID has changed for the given UUID to the new UUID. More... | |
| virtual DtOrganizationManagerNode * | lookupNode (const DtUUID &) const |
| Methods for inspecting the hierarchy. More... | |
| virtual DtOrganizationManagerNode * | lookupNodeByUUID (const DtUUID &) const |
| Looks up node by UUID. Call if you know this is a valid vrfUUID, else call lookupNode. More... | |
| virtual bool | removeNode (const DtUUID &) |
| Removes the node represented by the UUID. More... | |
| virtual bool | isSubordinateOfTopLevel (const DtUUID &) const |
| virtual const DtUUID & | superior (const DtUUID &) const |
| virtual DtSharedVrfObjectReference | superiorVrfObject (const DtUUID &) const |
| virtual bool | isSubordinateOf (const DtUUID &subordinate, const DtUUID &superior) const |
| virtual void | addNodeAddedCallback (DtOrgViewCallbackList::DtCallbackFunctionType fcn, void *userData) const |
| Callback for notification when a child is added to the list of child nodes. More... | |
| virtual void | removeNodeAddedCallback (DtOrgViewCallbackList::DtCallbackFunctionType fcn, void *userData) const |
| virtual void | addNodeRemovedCallback (DtOrgViewCallbackList::DtCallbackFunctionType fcn, void *userData) const |
| Callback for notification when a child is to be removed from the list of child nodes. More... | |
| virtual void | removeNodeRemovedCallback (DtOrgViewCallbackList::DtCallbackFunctionType fcn, void *userData) const |
| virtual void | addNodeAboutToBeRemovedCallback (DtOrgViewCallbackList::DtCallbackFunctionType fcn, void *userData) const |
| Callback for notification when a child is about to be removed from the list of child nodes. More... | |
| virtual void | removeNodeAboutToBeRemovedCallback (DtOrgViewCallbackList::DtCallbackFunctionType fcn, void *userData) const |
| virtual DtOrganizationManagerNode * | locateSuperiorNodeForGlobalId (const DtGlobalObjectDesignator &globalId) const |
| Methods mainly used internally. More... | |
| virtual bool | isLocal (DtOrganizationManagerNode *node) const |
| virtual void | printHierarchy () const |
| Prints a text representation of the current hierarchy for debugging. More... | |
| virtual void | printNode (DtOrganizationManagerNode *node, int indentLevel=0) const |
| Prints a node and all its children recursively. More... | |
| virtual const DtVrfObjectManager * | objectManager () const |
| virtual DtSharedVrfObjectReference | topLevelObjectForForce (const DtForceType &force) const |
| virtual DtOrganizationManagerNode * | topLevelNodeForForce (DtForceType force) const |
| virtual const UUIDMap & | nodes () const |
Static Public Member Functions | |
| static void | addToOrganizationCallback (DtSimMessage *msg, void *usr) |
| static void | removeFromOrganizationCallback (DtSimMessage *msg, void *usr) |
Static Public Member Functions inherited from DtOrganizationView | |
| static void | vrfObjectAddedCallback (const DtVrfObject *vrfObject, void *usr) |
| static void | vrfObjectAboutToBeRemovedCallback (const DtVrfObject *vrfObject, void *usr) |
| static bool | isTopLevelEntity (const DtEntityType &objectType) |
| static bool | isOrganizedAggregate (const DtVrfObject *vrfObject) |
| static bool | isOrganizedEntity (const DtVrfObject *vrfObject) |
Protected Types | |
| typedef std::pair < DtOrganizationManager *, unsigned int > | DtPendingOperationCompletionCallbackData |
| Structure used in the userData field of the pending operation callbacks. More... | |
Protected Member Functions | |
| virtual void | invokeOrganizationManagerReadyCallbacks () |
| Called when organization manager ready state has changed. More... | |
| virtual void | processAddToOrganization (DtSimMessage *msg) |
| virtual void | processRemoveFromOrganization (DtSimMessage *msg) |
| virtual bool | setSuperiorIsLocal (const DtUUID &subordinate, const DtUUID &superiorId) |
| Returns true if the entire equivalent setSuperior call can be completed locally. More... | |
| virtual bool | setSuperiorToForceIsLocal (const DtUUID &subordinate) |
| Returns true if the entire equivalent setSuperiorToForce can be completed locally. More... | |
| virtual bool | detatchFromSuperiorIsLocal (const DtUUID &subordinate) |
| Returns true if the entire equivalent detach call can be completed locally. More... | |
| virtual bool | setSubordinateOrderIsLocal (const DtUUID &superior) const |
| Returns true if setSubordinateOrder call can be completed locally. More... | |
| virtual void | addOperationToQueue (DtOrgManagerOperation *operation) |
| Adds the specified operation to the queue. More... | |
| virtual unsigned int | newPendingOperationId () |
| Inserts the next pending operation ID onto the pending list, and returns that same ID. More... | |
| virtual void | clearPendingOperationId (unsigned int id) |
Protected Member Functions inherited from DtOrganizationView | |
| DtOrganizationView (const DtOrganizationView &orig) | |
| Copy constructor not implemented. More... | |
| DtOrganizationView & | operator= (const DtOrganizationView &orig) |
| Assignment operator not implemented. More... | |
| virtual DtOrganizationManagerNode * | createOrganizationManagerNode () const |
| Creates a new node to put into the hierarchy. More... | |
| virtual void | processVrfObjectAdded (const DtVrfObject *vrfObject) |
| virtual void | processVrfObjectAboutToBeRemoved (const DtVrfObject *vrfObject) |
| Looks up vrfObject's superior. More... | |
| virtual bool | shouldBeAdded (const 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. More... | |
| virtual void | disconnectNodeParent (DtOrganizationManagerNode *node) |
| Removes the specified node from the child list of it's current parent, and sets it parent to NULL. More... | |
| 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. More... | |
| virtual void | disconnectNodeChildren (DtOrganizationManagerNode *node) |
| Disconnects all the children from this node. More... | |
| virtual void | connectNodeToTopLevel (DtOrganizationManagerNode *node, bool allowCreation=true) |
| Makes this node a child of the top level node corresponding to its force type. More... | |
| virtual bool | networkStateIsDifferentFromLocalState (const DtOrganizationManagerNode &node) const |
| virtual void | invokeNodeAddedCallbacks (const DtUUID &) |
| Invokes all callbacks registered for notification that a node has been added. More... | |
| virtual void | invokeNodeRemovedCallbacks (const DtUUID &) |
| Invokes all callbacks registered for notification that a node is removed. More... | |
| virtual void | invokeNodeAboutToBeRemovedCallbacks (const DtUUID &) |
| Invokes all callbacks registered for notification that a node is about to be removed. More... | |
| virtual DtOrganizationManagerNode * | findNode (DtSharedVrfObjectReference obj) const |
| Try and find the org manager node by uuid, entity identifier and then marking text. More... | |
| virtual DtSharedVrfObjectReference | findObject (const DtUUID &uuid) const |
| Try to find object by UUID. More... | |
Static Protected Member Functions | |
| static void | pendingOperationCompleteCallback (void *usr) |
| static int | nextId () |
Protected Attributes | |
| DtList | myPendingOperationList |
| List of DtOrgManagerOperations which have not been successfully executed yet. More... | |
| bool | myOperationsRunning |
| Flag to prevent reentrance of runPendingOperations. More... | |
| std::list< unsigned int > | myPendingOperationIdList |
| unsigned int | myNextPendingOperationId |
| DtOrganizationReadyCallbackList | myOrganizationManagerReadyCallbackList |
| DtPrintPendingOpsCommand * | myPrintPendingOpsCommand |
| DtDeletePendingOpsCommand * | myDeletePendingOpsCommand |
Protected Attributes inherited from DtOrganizationView | |
| DtVrfObjectManager * | myObjectManager |
| ForceMap | myTopLevelNodes |
| Hash list of top level nodes hashed by force type. More... | |
| UUIDMap | myIdHashList |
| Hash list associating entity identifiers with nodes. More... | |
| DtOrgViewCallbackList | myNodeAddedCallbackList |
| DtOrgViewCallbackList | myNodeRemovedCallbackList |
| DtOrgViewCallbackList | myNodeAboutToBeRemovedCallbackList |
| DtOrgViewManagedObjectListManager * | myManagedObjectListManager |
Static Protected Attributes | |
| static int | theNextId |
Private Member Functions | |
| DtOrganizationManager () | |
| Default constructor not implemented. More... | |
| DtOrganizationManager (const DtOrganizationManager &orig) | |
| Copy constructor not implemented. More... | |
| DtOrganizationManager & | operator= (const DtOrganizationManager &orig) |
| Assignment operator not implemented. More... | |
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 |
|
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 |
|
inline |
Number of operations that are pending.
|
virtual |
Called when scenario is closing. Can perform some cleanup.
|
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.
Inserts the next pending operation ID onto the pending list, and returns that same ID.
|
staticprotected |
|
staticprotected |
|
protected |
List of DtOrgManagerOperations which have not been successfully executed yet.
|
protected |
Flag to prevent reentrance of runPendingOperations.
|
protected |
|
protected |
|
protected |
|
staticprotected |