![]() |
VR-Forces 5.0.1 Developer's Guide
|
This class handles all requests as they pertain to viewing or modifying the ORBAT.
Classes | |
| class | LockedOrbatManagerNode |
| struct | OrbatInformation |
Public Types | |
| typedef boost::unordered_map < DtUUID, DtOrbatManagerNode * > | UUIDMap |
| typedef boost::unordered_map < DtUUID, OrbatInformation > | OrbatMap |
Public Member Functions | |
| DtOrbatManager (DtSimulationServices *objMgr, DtLocalObjectManager *) | |
| virtual | ~DtOrbatManager () |
| virtual bool | init () |
| virtual void | closingScenario () |
| virtual void | setOrbatEnabled (bool) |
| virtual bool | orbatEnabled () const |
| virtual DtOrbatDataList | addOrUpdateObjectsInOrbat (const DtOrbatDataList &, int flags=DtIfOrbatOperation::IterateChildrenOnAdd) |
| virtual DtOrbatDataList | removeObjectsFromOrbat (const DtOrbatDataList &) |
| virtual DtOrbatDataList | removeObjectFromOrbat (const DtRwOrbatData &, bool onlyPublished=false) |
| virtual void | sendOrbatList (int requestId=0) |
| virtual void | clearOrbat (bool send=false) |
| virtual void | mergeFrom (const DtOrbatManager &fromOm, bool sendNewList=false) |
| virtual bool | loadOrbat (const DtFilename &, bool send=false, bool clearOnLoad=true) |
| virtual bool | loadOrbatFromZipFile (const DtFilename &scenarioZipFile, const std::string &, bool send=false, bool clearOnLoad=true) |
| virtual bool | loadOrbat (const std::string &str, bool send=false, bool clearOnLoad=true) |
| virtual bool | writeOrbat (const DtFilename &) |
| virtual bool | writeOrbat (std::string &) |
| virtual LockedOrbatManagerNode | addNode (const DtRwOrbatData &) |
| virtual bool | hasNode (const DtUUID &) const |
| virtual LockedOrbatManagerNode | lookupNodeByUUID (const DtUUID &id) const |
| virtual LockedOrbatManagerNode | lookupNodeByMarkingText (const DtString &) const |
| const OrbatMap & | nodes () const |
| virtual DtOrbatDataList | modifyOrbatObjects (const DtOrbatDataList &) |
| virtual DtOrbatDataList | modifyOrbatObject (const DtRwOrbatData &) |
| virtual const DtLocalObject * | createOrReturnSuperiorOf (const DtUUID &, const DtVector &locationOfSuperior=DtVector::zero()) |
| virtual void | createSubordinatesOfObject (const DtUUID &) |
| virtual void | tick () |
| virtual void | makeAllSimulationObjectsPartOfOrbat () |
Protected Types | |
| typedef std::vector < DtOrbatManagerNode * > | OrbatNodeList |
| typedef std::map< DtUUID, OrbatNodeList > | UnparentedOrbatNodes |
| typedef std::map< int, DtOrbatManagerNode * > | RootNodesByForce |
Static Protected Member Functions | |
| static void | orbatOperationCallback (DtSimMessage *msg, void *usr) |
| static void | orbatResponseCallback (DtSimMessage *msg, void *usr) |
| static void | vrfObjectAdded (const DtLocalObject *, void *usr) |
| static void | orbatNodeRemovedCallback (const DtOrgNodeCallbackInfo &, void *) |
Protected Attributes | |
| bool | myIsOrbatEnabled |
| tbb::recursive_mutex | myOrbatNodesMutex |
| UnparentedOrbatNodes | myUnparentedOrbatNodes |
| OrbatMap | myOrbatNodes |
| DtSimulationServices * | mySimulationServices |
| DtLocalObjectManager * | myObjectManager |
| std::map< std::string, int > | myEntityTypeCounts |
| UUIDMap | myModifiedNodes |
| tbb::spin_rw_mutex | myRootNodeByForceMutex |
| RootNodesByForce | myRootNodesByForce |
| DtIsOrbatEnabledCommand * | myIsOrbatEnabledCommand |
| DtSetIsOrbatEnabledCommand * | mySetIsOrbatEnabledCommand |
| boost::signals2::scoped_connection | mySimObjectAddedConnection |
| boost::signals2::scoped_connection | mySimObjectDeletedConnection |
| tbb::spin_mutex | myModifiedNodesMutex |
| std::set< DtUUID > | myAddToOrbatOnNextAdd |
Private Member Functions | |
| DtOrbatManager () | |
| DtOrbatManager (const DtOrbatManager &orig) | |
| DtOrbatManager & | operator= (const DtOrbatManager &orig) |
| typedef boost::unordered_map<DtUUID, DtOrbatManagerNode*> DtOrbatManager::UUIDMap |
| typedef boost::unordered_map<DtUUID, OrbatInformation> DtOrbatManager::OrbatMap |
|
protected |
|
protected |
|
protected |
|
private |
Default constructor not implemented.
|
private |
Copy constructor not implemented.
| DtOrbatManager::DtOrbatManager | ( | DtSimulationServices * | objMgr, |
| DtLocalObjectManager * | |||
| ) |
Constructor.
|
virtual |
Destructor.
|
private |
Assignment operator not implemented.
|
virtual |
|
virtual |
Called when scenario is closing. Can perform some cleanup.
|
virtual |
Sets whether or not this is enabled to process orbat messages. Default is false.
|
virtual |
|
virtual |
Adds the specified orbat items to the orbat manager, creating new nodes as necessary. What will be returned is the orbat data created in response to this operation.
|
virtual |
Removes all the specified objects from the orbat. If any of the objects are a superior, all subordinates in the orbat are removed. Returns objects removed.
|
virtual |
Removes the specified object from the orbat. If any of the objects are a superior, all subordinates in the orbat are removed. Returns objects removed.
|
virtual |
Sends off a flat list of all the orbat items that are marked as part of the orbat. Up to receiver to reconstitute into a tree, if need be.
|
virtual |
Clears out any objects are are in the orbat only. If is orbat enabled and send flag is true will send an empty orbat list out.
|
virtual |
Merges orbat items from the given orbat into this orbat.
|
virtual |
Loads the scenario scripts from the specified file. If send is true sends out all scripts onto the network.
|
virtual |
|
virtual |
Loads the scenario scripts from the given string.
|
virtual |
Writes the local scenario scripts to the specified file.
|
virtual |
Writes the local scenario scripts to the specified string.
|
virtual |
Adds a node without expansion or hooking to child/parent.
|
virtual |
|
virtual |
Looks up and returns node by marking text. If there are multiple items with the same marking text will return the first it finds.
|
inline |
|
virtual |
Modify orbat hierarchy given the nodes to modify. Will return a list of changed nodes.
|
virtual |
Modify orbat hierarchy given the nodes to modify. If attached to a parent and that parent is not in the orbat view, will create a new parent for that, and walk the chain as long as the parent nodes are not created.
|
virtual |
If this is part of the orbat, and there is a parent for this object, return that parent. If there should be a parent and there is no parent created create it locall via a DtIfCreateVrfObject message. Pass in a location if you want to use that as a seed location. The location is geocentric.
|
virtual |
If this object is in the orbat and has uncreated subordinates, create them and parent them to their superior.
|
virtual |
Perform any pending operations.
|
virtual |
For any simulation object that is not currently part of the ORBAT, call processVrfObjectAdded on it to make it part of the ORBAT. If the DtDoNotAddToOrbat flag is set for vrf objects it will be removed so they will be added to the ORBAT.
|
protectedvirtual |
If the marking text is >= max length, trims end.
|
protectedvirtual |
Creates a new node to put into the hierarchy.
|
protectedvirtual |
Process an orbat operation.
|
staticprotected |
|
protectedvirtual |
Process an orbat response such that if this back-end is not the sender, update orbat.
|
staticprotected |
|
protectedvirtual |
Creates orbat nodes based on the orbat data. It will look up the parameter data for the given entity type, and, if that entity type is an aggregate will recursively create nodes for all subordinates in that aggregate and add them to the orbat with pre-generated unique ids.
|
protectedvirtual |
Given an entity type generate unique marking text.
|
staticprotected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Reorders the orbat order of any node that are after the orbat order of the specified node that share the same parent by the amount specified.
|
protectedvirtual |
Sets the order of the orbat node, reording others as needed.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Sets the force of all the subordinates (recursive) of the orbat node to the given force and returns a list of all nodes affected.
|
staticprotected |
|
protectedvirtual |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Number of items used by entity type so unique name can be generated when adding nodes to the orbat.
|
protected |
Map of modified nodes to be sent off during a tick.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |