class DtSimSubordinateSearch:
More...
Detailed Description
class DtSimSubordinateSearch:
Instances of DtSimSubordinateSearch are used as a base class for function classes that iterate over the echelon tree.
Constructor & Destructor Documentation
| DtSimSubordinateSearch::DtSimSubordinateSearch |
( |
| ) |
|
| virtual DtSimSubordinateSearch::~DtSimSubordinateSearch |
( |
| ) |
|
|
pure virtual |
copy constructor; not implemented
Member Function Documentation
If the first field of the modifier is "PATTERN" or "SELF", this function will parse out any additional arguments for those searches.
In the case of a pattern search, predicates are created and searchBelow is called on each matching item. In the case of a self search, searchBelow is called on the object which corresponds to the evaluatorObjectName. Otherwise, searchBelow is called on the entity which corresponds to searchName.
| virtual const DtString& DtSimSubordinateSearch::modifier |
( |
| ) |
const |
|
virtual |
Get the test modifier string.
| virtual void DtSimSubordinateSearch::setModifier |
( |
const DtString & |
modifier | ) |
|
|
virtual |
Set the test modifier.
If it is an empty string, checks only the specified entity. If it is the string "ANY", checks all subordinate entities to see if any of them match the test, If it is neither of the above, it requires that all specified entities match.
| virtual bool DtSimSubordinateSearch::searchBelow |
( |
const DtVrfObject & |
entity | ) |
|
|
virtual |
Call searchBelow to search the echelon hierarchy below a given entity.
It returns true only if it stopped the search before running out of entities to check. The results of the search will be stored in the derived search class.
Note that for searching purposes, the names "1 Force", "2 Force", etc. are considered "reserved" names to signify using all entities from that particular force (friendly, opposing, other, etc.). Since this is the case, you need to avoid naming entities in your simulation 1 Force, 2 Force, etc. that will be used in simulations and plans.
This call will take an object manager and a force type over which to check the subtree against entities of that type.
| virtual bool DtSimSubordinateSearch::result |
( |
| ) |
|
|
virtual |
Result function: returns true if it found a matching entity.
| virtual bool DtSimSubordinateSearch::isTopLevelEntity |
( |
const DtString & |
entity | ) |
const |
|
virtual |
Returns true if entity supplied is a top level entity.
Calls "forceType()", and, if force type returns a number that is not -1, this method will return true
| virtual bool DtSimSubordinateSearch::isValidEntity |
( |
const DtVrfObject & |
entity | ) |
|
|
virtual |
Returns true if the object is an aggregate, a platform, or a lifeform or cultural feature.
Reimplemented in DtSurrenderSearch.
| virtual int DtSimSubordinateSearch::forceType |
( |
const DtString & |
entity | ) |
const |
|
virtual |
Returns the force type of the entity based on the name pattern (1 Force, 2 Force, etc.) If name does not follow pattern, returns -1.
| virtual bool DtSimSubordinateSearch::initializeSearch |
( |
const DtVrfObject & |
entity | ) |
|
|
protectedvirtual |
Override initializeSearch if you need to do some initialization at the start of the search process.
It will only be called once per search before any of the inspect functions are called, and if this function returns false, then the search is canceled. By default it returns true.
Reimplemented in MySearch.
| virtual bool DtSimSubordinateSearch::inspectEntity |
( |
const DtVrfObject & |
entity | ) |
|
|
protectedvirtual |
Override inspectEntity to do any tests you want to do on base entities that are found in the search.
It should return true only if it has found what it is looking for and wants to terminate the search early. By default it simply returns false. It is usually called either because a non-local entity has been found and the default version of inspectRemoteEntity was called, or because a local entity was found and the default version of inspectLocalEntity was called.
Reimplemented in DtEntDiGuySearch, DtEntInAreaSearch, DtEntAltitudeSearch, DtEntLeftOfLineSearch, DtEntEmbarkationStateChangedSearch, DtSurrenderSearch, DtCheckEntityIdLevelSearch, DtEntDestroyedSearch, DtEntHasTargetSearch, DtEntUnderFireSearch, and MySearch.
| bool DtSimSubordinateSearch::inspectTopLevelEntity |
( |
const DtVrfObject & |
entity | ) |
|
|
protected |
| bool DtSimSubordinateSearch::inspectAggregateEntity |
( |
const DtVrfObject & |
entity | ) |
|
|
protected |
| virtual bool DtSimSubordinateSearch::searchSubtree |
( |
const DtVrfObject & |
entity | ) |
|
|
protectedvirtual |
This function calls one of the inspect functions based on the type of the given entity.
Note: if given a force-level entity to search, it calls inspectTopLevelEntity.
| virtual bool DtSimSubordinateSearch::searchSubordinates |
( |
const DtVrfObject & |
entity | ) |
|
|
protectedvirtual |
SearchSubordinates will call searchSubtree on all the immediate children of a given pseudo aggregate.
Reimplemented in DtEntDiGuySearch, DtEntInAreaSearch, DtEntAltitudeSearch, DtEntLeftOfLineSearch, DtEntEmbarkationStateChangedSearch, DtCheckEntityIdLevelSearch, DtSurrenderSearch, DtEntDestroyedSearch, DtEntHasTargetSearch, DtEntUnderFireSearch, and MySearch.
assignment operator; not implemented
Member Data Documentation
| DtString DtSimSubordinateSearch::myModifier |
|
protected |
| bool DtSimSubordinateSearch::myAnyFlag |
|
protected |
| bool DtSimSubordinateSearch::myResult |
|
protected |
The documentation for this class was generated from the following file: