![]() |
VR-Forces 4.0.4 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. | |
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. | |
Protected Types | |
| typedef std::pair < DtOrganizationManager *, unsigned int > | DtPendingOperationCompletionCallbackData |
| Structure used in the userData field of the pending operation callbacks. | |
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) |
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. | |
| bool | myOperationsRunning |
| Flag to prevent reentrance of runPendingOperations. | |
| std::list< unsigned int > | myPendingOperationIdList |
| unsigned int | myNextPendingOperationId |
| DtOrganizationReadyCallbackList | myOrganizationManagerReadyCallbackList |
| std::map< DtString, DtNameToObjectIdMap > | myReflectedObjectNames |
| Maps sim address as a DtString to a map of object names to their respective global Ids. | |
| std::map< DtString, DtStringSet > | myReflectedObjectGlobalIds |
| Maps sim address as a DtString to a set of global ids as strings. | |
| double | myLastObjectIndexSentTime |
| double | myObjectIndexHeartbeatThreshold |
| bool | myForceObjectIndexUpdate |
| DtPrintPendingOpsCommand * | myPrintPendingOpsCommand |
| DtDeletePendingOpsCommand * | myDeletePendingOpsCommand |
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 |
typedef std::pair<DtOrganizationManager*, unsigned int> DtOrganizationManager::DtPendingOperationCompletionCallbackData [protected] |
Structure used in the userData field of the pending operation callbacks.
| DtOrganizationManager::DtOrganizationManager | ( | ) | [private] |
Default constructor not implemented.
| DtOrganizationManager::DtOrganizationManager | ( | const DtOrganizationManager & | orig | ) | [private] |
Copy constructor not implemented.
Constructor.
| virtual DtOrganizationManager::~DtOrganizationManager | ( | ) | [virtual] |
Destructor.
| DtOrganizationManager& DtOrganizationManager::operator= | ( | const DtOrganizationManager & | orig | ) | [private] |
Assignment operator not implemented.
| virtual bool DtOrganizationManager::init | ( | ) | [virtual] |
Reimplemented from DtOrganizationView.
| virtual DtOrganizationManagerNode* DtOrganizationManager::addEntity | ( | DtVrfObject * | vrfObject | ) | [virtual] |
! Functions for manipulating the hierarchy
Overridden to run pending operations after the add.
Reimplemented from DtOrganizationView.
| virtual void DtOrganizationManager::removeEntity | ( | DtVrfObject * | vrfObject | ) | [virtual] |
Overridden to run pending operations after the remove.
Reimplemented from DtOrganizationView.
| virtual void DtOrganizationManager::updateAggregate | ( | DtVrfObject * | vrfObject | ) | [virtual] |
Overridden to run pending operations after the update.
Reimplemented from DtOrganizationView.
| virtual void DtOrganizationManager::updateEntity | ( | DtVrfObject * | vrfObject | ) | [virtual] |
Overridden to run pending operations after the update.
Reimplemented from DtOrganizationView.
| virtual void DtOrganizationManager::setSuperior | ( | const DtEntityIdentifier & | subordinateId, |
| const DtEntityIdentifier & | superiorId, | ||
| int | designator = 0, |
||
| bool | localOnly = false |
||
| ) | [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 void DtOrganizationManager::setSuperiorToForce | ( | const DtEntityIdentifier & | subordinateId, |
| int | designator = 0, |
||
| bool | localOnly = false |
||
| ) | [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 void DtOrganizationManager::queueSetSuperior | ( | const DtString & | subordinateName, |
| const DtString & | superiorName, | ||
| int | designator = 0, |
||
| DtOrganizationManagerCallbackFcn | completionCallback = 0, |
||
| void * | usrData = 0 |
||
| ) | [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 void DtOrganizationManager::queueSetSuperiorToForce | ( | const DtString & | subordinateName, |
| int | designator = 0, |
||
| DtOrganizationManagerCallbackFcn | completionCallback = 0, |
||
| void * | usrData = 0 |
||
| ) | [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 void DtOrganizationManager::queueChangeSet | ( | const DtOrganizationChangeSet & | changeSet, |
| int & | changeSetRequestId, | ||
| DtOrganizationManagerCallbackFcn | completionCallback = 0, |
||
| void * | usrData = 0 |
||
| ) | [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 void DtOrganizationManager::removeChangeSetCallback | ( | int | changeSetRequestId, |
| DtOrganizationManagerCallbackFcn | completionCallback, | ||
| void * | usrData = 0 |
||
| ) | [virtual] |
| virtual void DtOrganizationManager::detatchFromSuperior | ( | const DtEntityIdentifier & | subordinateId, |
| bool | localOnly = false |
||
| ) | [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 void DtOrganizationManager::setSubordinateOrder | ( | const DtEntityIdentifier & | superiorId, |
| const std::vector< DtEntityIdentifier > & | orderedSubordinateList, | ||
| bool | localOnly = false |
||
| ) | [virtual] |
Set order of subordinates belonging to the given superior, according to the order in the given list.
| static void DtOrganizationManager::addToOrganizationCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
| static void DtOrganizationManager::removeFromOrganizationCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
| static void DtOrganizationManager::objectAboutToBeRemovedCallback | ( | DtVrfObject * | vrfObject, |
| void * | usr | ||
| ) | [static] |
Registered with the objectManager's objectAboutToBeRemoved callback list.
Forces the object index to update the next time updateObjectIndex is called.
| virtual void DtOrganizationManager::processObjectAboutToBeRemoved | ( | ) | [virtual] |
| virtual bool DtOrganizationManager::allLocalOrgChangesComplete | ( | ) | const [virtual] |
| virtual bool DtOrganizationManager::hasPendingOperations | ( | ) | const [virtual] |
Returns true if there are any pending operations.
| virtual void DtOrganizationManager::addOrganizationManagerReadyCallback | ( | DtOrganizationManagerReadyCallbackFcn | fcn, |
| void * | usrData | ||
| ) | [virtual] |
Add callback to be invoked when the organization manager readiness changes.
| virtual void DtOrganizationManager::removeOrganizationManagerReadyCallback | ( | DtOrganizationManagerReadyCallbackFcn | fcn, |
| void * | usrData | ||
| ) | [virtual] |
Removes callback to be invoked when the organization manager readiness changes.
| virtual void DtOrganizationManager::runPendingOperations | ( | ) | [virtual] |
Executes all of the pending operations.
| virtual void DtOrganizationManager::printPendingOperations | ( | ) | const [virtual] |
| virtual void DtOrganizationManager::deletePendingOperations | ( | ) | [virtual] |
| virtual void DtOrganizationManager::deletePendingOperationsFor | ( | DtString | objectName | ) | [virtual] |
| virtual void DtOrganizationManager::updateObjectIndex | ( | ) | [virtual] |
| virtual bool DtOrganizationManager::objectExistsInIndexByName | ( | const DtString & | name, |
| DtString & | simAddress, | ||
| DtString & | objectId | ||
| ) | [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 bool DtOrganizationManager::objectExistsInIndexByGlobalId | ( | const DtString & | globalId, |
| DtString & | simAddress | ||
| ) | [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 void DtOrganizationManager::objectIndexMessageCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
Update local cached object index based on new message.
Ignores messages sent from ourselves.
| virtual void DtOrganizationManager::processObjectIndexMessage | ( | DtSimInterfaceMessage * | msg | ) | [virtual] |
Update local cached object index based on new message.
Ignores messages sent from ourselves.
| virtual void DtOrganizationManager::invokeOrganizationManagerReadyCallbacks | ( | ) | [protected, virtual] |
Called when organization manager ready state has changed.
| virtual void DtOrganizationManager::processAddToOrganization | ( | DtSimMessage * | msg | ) | [protected, virtual] |
| virtual void DtOrganizationManager::processRemoveFromOrganization | ( | DtSimMessage * | msg | ) | [protected, virtual] |
| virtual bool DtOrganizationManager::setSuperiorIsLocal | ( | const DtEntityIdentifier & | subordinateId, |
| const DtEntityIdentifier & | superiorId | ||
| ) | [protected, virtual] |
Returns true if the entire equivalent setSuperior call can be completed locally.
| virtual bool DtOrganizationManager::setSuperiorToForceIsLocal | ( | const DtEntityIdentifier & | subordinateId | ) | [protected, virtual] |
Returns true if the entire equivalent setSuperiorToForce can be completed locally.
| virtual bool DtOrganizationManager::detatchFromSuperiorIsLocal | ( | const DtEntityIdentifier & | subordinateId | ) | [protected, virtual] |
Returns true if the entire equivalent detach call can be completed locally.
| virtual bool DtOrganizationManager::setSubordinateOrderIsLocal | ( | const DtEntityIdentifier & | superiorId | ) | const [protected, virtual] |
Returns true if setSubordinateOrder call can be completed locally.
| virtual void DtOrganizationManager::addOperationToQueue | ( | DtOrgManagerOperation * | operation | ) | [protected, virtual] |
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.
| virtual unsigned int DtOrganizationManager::newPendingOperationId | ( | ) | [protected, virtual] |
Inserts the next pending operation ID onto the pending list, and returns that same ID.
| virtual void DtOrganizationManager::clearPendingOperationId | ( | unsigned int | id | ) | [protected, virtual] |
| static void DtOrganizationManager::pendingOperationCompleteCallback | ( | void * | usr | ) | [static, protected] |
| static int DtOrganizationManager::nextId | ( | ) | [static, protected] |
DtList DtOrganizationManager::myPendingOperationList [protected] |
List of DtOrgManagerOperations which have not been successfully executed yet.
bool DtOrganizationManager::myOperationsRunning [protected] |
Flag to prevent reentrance of runPendingOperations.
std::list<unsigned int> DtOrganizationManager::myPendingOperationIdList [protected] |
unsigned int DtOrganizationManager::myNextPendingOperationId [protected] |
DtOrganizationReadyCallbackList DtOrganizationManager::myOrganizationManagerReadyCallbackList [protected] |
std::map<DtString, DtNameToObjectIdMap> DtOrganizationManager::myReflectedObjectNames [protected] |
Maps sim address as a DtString to a map of object names to their respective global Ids.
std::map<DtString, DtStringSet> DtOrganizationManager::myReflectedObjectGlobalIds [protected] |
Maps sim address as a DtString to a set of global ids as strings.
double DtOrganizationManager::myLastObjectIndexSentTime [protected] |
double DtOrganizationManager::myObjectIndexHeartbeatThreshold [protected] |
bool DtOrganizationManager::myForceObjectIndexUpdate [protected] |
DtPrintPendingOpsCommand* DtOrganizationManager::myPrintPendingOpsCommand [protected] |
DtDeletePendingOpsCommand* DtOrganizationManager::myDeletePendingOpsCommand [protected] |
int DtOrganizationManager::theNextId [static, protected] |