![]() |
VR-Forces 4.8 Class Documentation
|
This class derives from the DtOrganizationManager and will handle all requests as it pertains to the orbat. More...
Public Types | |
| typedef boost::unordered_map < DtUUID, DtOrbatManagerNode * > | UUIDMap |
Public Member Functions | |
| DtOrbatManager (DtVrfObjectManager *objMgr) | |
| Constructor. More... | |
| virtual | ~DtOrbatManager () |
| Destructor. More... | |
| virtual bool | init () |
| virtual void | closingScenario () |
| Called when scenario is closing. Can perform some cleanup. More... | |
| virtual void | setOrbatEnabled (bool) |
| Sets whether or not this is enabled to process orbat messages. Default is false. More... | |
| virtual bool | orbatEnabled () const |
| virtual DtOrbatDataList | addOrUpdateObjectsInOrbat (const DtOrbatDataList &, int flags=DtIfOrbatOperation::IterateChildrenOnAdd) |
| Adds the specified orbat items to the orbat manager, creating new nodes as necessary. More... | |
| virtual DtOrbatDataList | removeObjectsFromOrbat (const DtOrbatDataList &) |
| Removes all the specified objects from the orbat. More... | |
| virtual DtOrbatDataList | removeObjectFromOrbat (const DtRwOrbatData &, bool onlyPublished=false) |
| Removes the specified object from the orbat. More... | |
| virtual void | sendOrbatList (int requestId=0) |
| 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. More... | |
| virtual void | clearOrbat (bool send=false) |
| 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. More... | |
| virtual void | mergeFrom (const DtOrbatManager &fromOm, bool sendNewList=false) |
| Merges orbat items from the given orbat into this orbat. More... | |
| virtual bool | loadOrbat (const DtFilename &, bool send=false, bool clearOnLoad=true) |
| Loads the scenario scripts from the specified file. If send is true sends out all scripts onto the network. More... | |
| 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) |
| Loads the scenario scripts from the given string. More... | |
| virtual bool | writeOrbat (const DtFilename &) |
| Writes the local scenario scripts to the specified file. More... | |
| virtual bool | writeOrbat (std::string &) |
| Writes the local scenario scripts to the specified string. More... | |
| virtual DtOrbatManagerNode * | addNode (const DtRwOrbatData &) |
| Adds a node without expansion or hooking to child/parent. More... | |
| virtual DtOrbatManagerNode * | lookupNodeByUUID (const DtUUID &id) const |
| virtual DtOrbatManagerNode * | lookupNodeByMarkingText (const DtString &) const |
| Looks up and returns node by marking text. More... | |
| const UUIDMap & | nodes () const |
| virtual DtOrbatDataList | modifyOrbatObjects (const DtOrbatDataList &) |
| Modify orbat hierarchy given the nodes to modify. Will return a list of changed nodes. More... | |
| virtual DtOrbatDataList | modifyOrbatObject (const DtRwOrbatData &) |
| Modify orbat hierarchy given the nodes to modify. More... | |
| virtual const DtVrfObject * | createOrReturnSuperiorOf (const DtUUID &, const DtVector &locationOfSuperior=DtVector::zero()) |
| If this is part of the orbat, and there is a parent for this object, return that parent. More... | |
| virtual void | createSubordinatesOfObject (const DtUUID &) |
| If this object is in the orbat and has uncreated subordinates, create them and parent them to their superior. More... | |
| virtual void | tick () |
| Perform any pending operations. More... | |
| virtual void | aboutToDeleteObjectManager () |
| virtual void | processVrfObjectAdded (const DtVrfObject *, int flags=0) |
| virtual void | makeAllSimulationObjectsPartOfOrbat () |
| For any simulation object that is not currently part of the ORBAT, call processVrfObjectAdded on it to make it part of the ORBAT. More... | |
Protected Types | |
| typedef std::vector < DtOrbatManagerNode * > | OrbatNodeList |
| typedef std::map< DtUUID, OrbatNodeList > | UnparentedOrbatNodes |
| typedef std::map< DtUUID, DtOrganizationManagerNode * > | WatchedNodes |
| typedef std::map< int, DtOrbatManagerNode * > | RootNodesByForce |
Protected Member Functions | |
| virtual DtString | trimNameForLength (int maxLength, const DtString &) const |
| If the marking text is >= max length, trims end. More... | |
| virtual DtOrbatManagerNode * | createOrbatManagerNode () const |
| Creates a new node to put into the hierarchy. More... | |
| virtual void | processOrbatOperation (DtSimMessage *msg) |
| Process an orbat operation. More... | |
| virtual DtOrbatDataList | createOrbatNodes (const DtRwOrbatData &, int flags=DtIfOrbatOperation::IterateChildrenOnAdd) |
| Creates orbat nodes based on the orbat data. More... | |
| virtual bool | loadOrbat (DtlInputStream *, bool send) |
| virtual DtString | generateMarkingText (const DtEntityType &) |
| Given an entity type generate unique marking text. More... | |
| virtual void | processVrfObjectAboutToBeRemoved (const DtVrfObject *) |
| virtual void | processOrganizationManagerNodeAdded (const DtUUID &) |
| virtual void | processOrganizationManagerNodeAdded (DtOrganizationManagerNode *) |
| virtual void | removeWatchedNode (const DtUUID &) |
| virtual void | processChildAdded (const DtUUID &superior, const DtUUID &subordinate) |
| virtual void | processChildRemoved (const DtUUID &superior, const DtUUID &subordinate) |
| virtual void | processOrganizationManagerNodeAboutToBeRemoved (const DtUUID &) |
| virtual void | processOrbatNodeRemoved (const DtUUID &, const DtUUID &) |
| virtual void | reorderOrbatNodesExcluding (DtOrbatManagerNode *) |
| 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. More... | |
| virtual void | setOrbatNodeOrder (DtOrbatManagerNode *, int order, bool inserting=false) |
| Sets the order of the orbat node, reording others as needed. More... | |
| virtual void | insertOrbatNodeInOrder (DtOrbatManagerNode *, int order) |
| virtual DtOrbatManagerNode * | rootNodeForForce (int) |
| virtual void | processObjectDataChanged (const DtVrfObject *, int flag) |
| virtual DtOrbatDataList | setForceToSubordinatesOf (int force, DtOrbatManagerNode *) const |
| Sets the force of all the subordinates (recursive) of the orbat node to the given force and returns a list of all nodes affected. More... | |
Static Protected Member Functions | |
| static void | orbatOperationCallback (DtSimMessage *msg, void *usr) |
| static void | vrfObjectAdded (const DtVrfObject *, void *usr) |
| static void | vrfObjectAboutToBeRemoved (const DtVrfObject *, void *usr) |
| static void | organizationManagerNodeAdded (const DtUUID &, void *) |
| Called when a node is added, add callbacks on that node for when anything changes about it so we can change the orbat hierarchy, if need be. More... | |
| static void | childAddedCallback (const DtUUID &superior, const DtUUID &subordinate, void *usr) |
| static void | childRemovedCallback (const DtUUID &superior, const DtUUID &subordinate, void *usr) |
| static void | organizationManagerNodeAboutToBeRemoved (const DtUUID &, void *) |
| static void | orbatNodeRemovedCallback (const DtUUID &, const DtUUID &, void *) |
| static void | objectDataChangedCallback (const DtVrfObjectCallbackData &, void *usr) |
Protected Attributes | |
| bool | myIsOrbatEnabled |
| UnparentedOrbatNodes | myUnparentedOrbatNodes |
| UUIDMap | myOrbatNodes |
| DtVrfObjectManager * | myObjectManager |
| std::map< std::string, int > | myEntityTypeCounts |
| Number of items used by entity type so unique name can be generated when adding nodes to the orbat. More... | |
| WatchedNodes | myWatchedNodes |
| UUIDMap | myModifiedNodes |
| Map of modified nodes to be sent off during a tick. More... | |
| RootNodesByForce | myRootNodesByForce |
| DtIsOrbatEnabledCommand * | myIsOrbatEnabledCommand |
| DtSetIsOrbatEnabledCommand * | mySetIsOrbatEnabledCommand |
Private Member Functions | |
| DtOrbatManager () | |
| Default constructor not implemented. More... | |
| DtOrbatManager (const DtOrbatManager &orig) | |
| Copy constructor not implemented. More... | |
| DtOrbatManager & | operator= (const DtOrbatManager &orig) |
| Assignment operator not implemented. More... | |
This class derives from the DtOrganizationManager and will handle all requests as it pertains to the orbat.
It will use the organization manager hierarchy to install nodes that can be created in the scenario (if they are not already created) and whether or not the created nodes are part of the orbat system.
| typedef boost::unordered_map<DtUUID, DtOrbatManagerNode*> DtOrbatManager::UUIDMap |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
Default constructor not implemented.
|
private |
Copy constructor not implemented.
| DtOrbatManager::DtOrbatManager | ( | DtVrfObjectManager * | objMgr | ) |
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 |
|
virtual |
|
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 |
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 |
|
staticprotected |
|
protectedvirtual |
|
staticprotected |
Called when a node is added, add callbacks on that node for when anything changes about it so we can change the orbat hierarchy, if need be.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
staticprotected |
|
protectedvirtual |
|
staticprotected |
|
protectedvirtual |
|
staticprotected |
|
protectedvirtual |
|
staticprotected |
|
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 |
|
staticprotected |
|
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.
|
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 |
|
protected |
Map of modified nodes to be sent off during a tick.
|
protected |
|
protected |
|
protected |