![]() |
VR-Forces 4.0.4 Class Documentation
|
Public Member Functions | |
| DtFormationState () | |
| DtFormationState (const DtFormationState &orig) | |
| DtFormationState & | operator= (const DtFormationState &orig) |
| virtual | ~DtFormationState () |
| virtual void | setFormation (const DtFormation &formation) |
| Set the physical formation layout. | |
| virtual void | setFormation (const std::vector< DtFormationRecord * > &formation) |
| virtual void | addFormationRecord (const DtFormationRecord &formationRecord, int positionIndex) |
| adds/replaces formation record to formation at the given position index | |
| virtual void | removeFormationRecord (int positionIndex) |
| remove formation record at the given position index in the formation | |
| virtual void | setEntityList (const std::vector< DtString > &entityList) |
| sets (replaces) entity list, assigning promotion indices in the order the entities are given, starting at zero. | |
| virtual void | setEntityListAndFormation (const std::vector< DtString > &entityList, const DtFormation &formation, const std::list< int > &formationPositions) |
| virtual void | setEntityListAndFormation (DtOrgViewManagedObjectListConstPtr entityList, const DtFormation &formation, const std::list< int > &formationPositions) |
| Calls to setEntityListAndFormation above with list of entity names extracted from subordinate query list. | |
| virtual const std::vector < DtString > & | entityList () const |
| List of subordinate names in the formation. | |
| virtual void | clearEntityList () |
| Remove all subordinate names from the formation. | |
| virtual bool | lookup (const DtString &objectName, DtFormationQueryResult &result) |
| Lookup formation entry by subordinate's object name. | |
| virtual int | lookupPromotionIndexByName (const DtString &objectName) const |
| virtual void | queryAll (DtFormationQueryResultList &resultList) |
| Returns formation state associated with each entity in formation. | |
| virtual DtString | formationLeader () const |
| Returns the entity who is not positioned relative to someone else in the formation, i.e. | |
| virtual double | formationHalfLength () const |
| Returns the half-length of the formation. | |
| virtual void | print () |
| For debugging. | |
| virtual void | addFormationStateChangedCallback (DtFormationStateCallbackFcn fcn, void *userData) |
| Registers callback for notification of any change to the formation state. | |
| virtual void | removeFormationStateChangedCallback (DtFormationStateCallbackFcn fcn, void *userData) |
| Removes callback for notification of any change to the formation state. | |
| virtual void | enableFormationCallbacks () |
| Control whether or not formation callbacks are invoked. | |
| virtual void | disableFormationCallbacks () |
| virtual bool | isAvailableForFormation (const DtVrfObject *) const |
| Returns true if this item is available for formation. | |
Protected Member Functions | |
| virtual DtFormationRecord * | lookupFormationRecord (int positionIndex) |
| virtual DtVector | lookupFollowOffset (const DtString &entity) |
| virtual DtString | lookupLeader (const DtString &entity) |
| virtual void | rebuildEntityToPositionMap () |
| virtual DtFormationRecord * | generateAdditionalFormationRecord (int positionIndex) const |
| Returns a new instance of a DtFormationRecord. | |
| void | emptyPositionIndexToFormationRecordMap () |
| Deletes all DtFormationRecord entries in myPositionIndexToFormationRecordMap and clears out all entries from map. | |
| virtual DtVector | positionOffsetForPositionIndex (int positionIndex) |
| virtual void | invokeFormationStateChangedCallbacks () const |
Protected Attributes | |
| std::vector< DtString > | myEntityList |
| std::map< int, DtFormationRecord * > | myPositionIndexToFormationRecordMap |
| std::map< DtString, DtVector > | myEntityToPositionMap |
| std::map< int, DtString > | myPositionIndexToEntityMap |
| std::map< DtString, int > | myEntityToPositionIndexMap |
| std::vector < DtFormationStateCallbackInfo > | myFormationStateChangedCallbackList |
| List of DtFormationStateCallbackFcns. | |
| bool | myCallbacksAreEnabled |
| DtFormationState::DtFormationState | ( | const DtFormationState & | orig | ) |
| virtual DtFormationState::~DtFormationState | ( | ) | [virtual] |
| DtFormationState& DtFormationState::operator= | ( | const DtFormationState & | orig | ) |
| virtual void DtFormationState::setFormation | ( | const DtFormation & | formation | ) | [virtual] |
Set the physical formation layout.
| virtual void DtFormationState::setFormation | ( | const std::vector< DtFormationRecord * > & | formation | ) | [virtual] |
| virtual void DtFormationState::addFormationRecord | ( | const DtFormationRecord & | formationRecord, |
| int | positionIndex | ||
| ) | [virtual] |
adds/replaces formation record to formation at the given position index
| virtual void DtFormationState::removeFormationRecord | ( | int | positionIndex | ) | [virtual] |
remove formation record at the given position index in the formation
| virtual void DtFormationState::setEntityList | ( | const std::vector< DtString > & | entityList | ) | [virtual] |
sets (replaces) entity list, assigning promotion indices in the order the entities are given, starting at zero.
| virtual void DtFormationState::setEntityListAndFormation | ( | const std::vector< DtString > & | entityList, |
| const DtFormation & | formation, | ||
| const std::list< int > & | formationPositions | ||
| ) | [virtual] |
| virtual void DtFormationState::setEntityListAndFormation | ( | DtOrgViewManagedObjectListConstPtr | entityList, |
| const DtFormation & | formation, | ||
| const std::list< int > & | formationPositions | ||
| ) | [virtual] |
Calls to setEntityListAndFormation above with list of entity names extracted from subordinate query list.
| virtual const std::vector<DtString>& DtFormationState::entityList | ( | ) | const [virtual] |
List of subordinate names in the formation.
| virtual void DtFormationState::clearEntityList | ( | ) | [virtual] |
Remove all subordinate names from the formation.
| virtual bool DtFormationState::lookup | ( | const DtString & | objectName, |
| DtFormationQueryResult & | result | ||
| ) | [virtual] |
Lookup formation entry by subordinate's object name.
| virtual int DtFormationState::lookupPromotionIndexByName | ( | const DtString & | objectName | ) | const [virtual] |
| virtual void DtFormationState::queryAll | ( | DtFormationQueryResultList & | resultList | ) | [virtual] |
Returns formation state associated with each entity in formation.
It is up to the caller to delete the memory associated with each DtFormationQueryResult item returned in the vector.
| virtual DtString DtFormationState::formationLeader | ( | ) | const [virtual] |
Returns the entity who is not positioned relative to someone else in the formation, i.e.
the overall 'leader'
| virtual double DtFormationState::formationHalfLength | ( | ) | const [virtual] |
Returns the half-length of the formation.
| virtual void DtFormationState::print | ( | ) | [virtual] |
For debugging.
| virtual void DtFormationState::addFormationStateChangedCallback | ( | DtFormationStateCallbackFcn | fcn, |
| void * | userData | ||
| ) | [virtual] |
Registers callback for notification of any change to the formation state.
| virtual void DtFormationState::removeFormationStateChangedCallback | ( | DtFormationStateCallbackFcn | fcn, |
| void * | userData | ||
| ) | [virtual] |
Removes callback for notification of any change to the formation state.
| virtual void DtFormationState::enableFormationCallbacks | ( | ) | [virtual] |
Control whether or not formation callbacks are invoked.
By default, they are enabled. Only the DtFormationController should ever call these functions.
| virtual void DtFormationState::disableFormationCallbacks | ( | ) | [virtual] |
| virtual bool DtFormationState::isAvailableForFormation | ( | const DtVrfObject * | ) | const [virtual] |
Returns true if this item is available for formation.
Uses the DtTaskableSubordinatePredicate to figure this out
| virtual DtFormationRecord* DtFormationState::lookupFormationRecord | ( | int | positionIndex | ) | [protected, virtual] |
| virtual DtVector DtFormationState::lookupFollowOffset | ( | const DtString & | entity | ) | [protected, virtual] |
| virtual DtString DtFormationState::lookupLeader | ( | const DtString & | entity | ) | [protected, virtual] |
| virtual void DtFormationState::rebuildEntityToPositionMap | ( | ) | [protected, virtual] |
| virtual DtFormationRecord* DtFormationState::generateAdditionalFormationRecord | ( | int | positionIndex | ) | const [protected, virtual] |
Returns a new instance of a DtFormationRecord.
It is up to the caller to delete the memory associated with the record.
| void DtFormationState::emptyPositionIndexToFormationRecordMap | ( | ) | [protected] |
Deletes all DtFormationRecord entries in myPositionIndexToFormationRecordMap and clears out all entries from map.
| virtual DtVector DtFormationState::positionOffsetForPositionIndex | ( | int | positionIndex | ) | [protected, virtual] |
| virtual void DtFormationState::invokeFormationStateChangedCallbacks | ( | ) | const [protected, virtual] |
std::vector<DtString> DtFormationState::myEntityList [protected] |
std::map<int, DtFormationRecord*> DtFormationState::myPositionIndexToFormationRecordMap [protected] |
std::map<DtString, DtVector> DtFormationState::myEntityToPositionMap [protected] |
std::map<int, DtString> DtFormationState::myPositionIndexToEntityMap [protected] |
std::map<DtString, int> DtFormationState::myEntityToPositionIndexMap [protected] |
std::vector<DtFormationStateCallbackInfo> DtFormationState::myFormationStateChangedCallbackList [protected] |
List of DtFormationStateCallbackFcns.
Clients register callback functions on this list for notification when the formation state has changed for some reason.
bool DtFormationState::myCallbacksAreEnabled [protected] |