![]() |
VR-Forces 4.0.4 Class Documentation
|
class DtMissileDistractionPSR: More...

Public Member Functions | |
| DtMissileDistractionPSR (DtVrfObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) | |
| constructor | |
| DtMissileDistractionPSR (const DtMissileDistractionPSR &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) | |
| copy constructor | |
| virtual | ~DtMissileDistractionPSR () |
| destructor | |
| DtMissileDistractionPSR & | operator= (const DtMissileDistractionPSR &orig) |
| assignment operator - not implemented | |
| virtual DtVrfProcessStateRepository * | clone (const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const |
| returns a newly created copy of this object | |
| virtual DtString | type () const |
| Returns the string type of the repository, as defined in procSRTypes.h. | |
| virtual bool | init () |
| Call after creation. | |
| virtual void | setAmDistracted (bool fooled) |
| Set to true when the missile encounters a counter measure that has succeeded in fooling it and it retargets to go after the counter measure instead of its original target. | |
| virtual bool | amDistracted () const |
| virtual const std::set < DtString > & | verifiedDistractionsList () const |
| The list of countermeasure object names that have been checked and verified by the missile that they did not distract it. | |
| virtual bool | findCounterMeasure (const DtString &objectName) const |
| Returns true if the countermeasure is on the verified list. | |
| virtual void | addCounterMeasure (const DtString &objectName) |
| virtual void | removeCounterMeasure (const DtString &objectName) |
| virtual void | clearVerifiedDistractionsList () |
| Empties the verified Distractions List. | |
| virtual void | putSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtReaderWriter::appPath()) |
| Override to call mapTargetIdsToTargetNames() before calling base class version to write ourselves to file. | |
| virtual void | getSelf (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings) |
| Override to set flag indicating we should map target names to target identifiers the next time lookupPreviousTarget() is called. | |
Static Public Member Functions | |
| static DtVrfProcessStateRepository * | creator (const DtString &rwName, DtVrfObject *vrfObject, DtReaderWriterRegistry *parentRegistry) |
| Returns a newly created instance of this class. | |
Protected Attributes | |
| DtRwBoolean | myAmDistracted |
| Keep track if the missile has been distracted and has retargeted. | |
| std::set< DtString > | myVerifiedDistractionsList |
| This list keeps track of which countermeasures have already been tested and found to not distract the missile away from the target. | |
| DtRwStringList | mySerializableVerifiedDistractionsList |
class DtMissileDistractionPSR:
Instances of DtMissileDistractionPSR are used to hold the shared/checkpointable state data for the DtMissileDistraction class.
| DtMissileDistractionPSR::DtMissileDistractionPSR | ( | DtVrfObject * | vrfObject, |
| const DtString & | rwName = DtString::nullString(), |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
constructor
| DtMissileDistractionPSR::DtMissileDistractionPSR | ( | const DtMissileDistractionPSR & | orig, |
| const DtString & | rwName = DtString::nullString(), |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
copy constructor
| virtual DtMissileDistractionPSR::~DtMissileDistractionPSR | ( | ) | [virtual] |
destructor
| DtMissileDistractionPSR& DtMissileDistractionPSR::operator= | ( | const DtMissileDistractionPSR & | orig | ) |
assignment operator - not implemented
| virtual DtVrfProcessStateRepository* DtMissileDistractionPSR::clone | ( | const DtString & | rwName = DtString::nullString(), |
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | const [virtual] |
returns a newly created copy of this object
Implements DtVrfProcessStateRepository.
| virtual DtString DtMissileDistractionPSR::type | ( | ) | const [virtual] |
Returns the string type of the repository, as defined in procSRTypes.h.
Implements DtVrfProcessStateRepository.
| virtual bool DtMissileDistractionPSR::init | ( | ) | [virtual] |
Call after creation.
Reimplemented from DtVrfProcessStateRepository.
| virtual void DtMissileDistractionPSR::setAmDistracted | ( | bool | fooled | ) | [virtual] |
Set to true when the missile encounters a counter measure that has succeeded in fooling it and it retargets to go after the counter measure instead of its original target.
| virtual bool DtMissileDistractionPSR::amDistracted | ( | ) | const [virtual] |
| virtual const std::set<DtString>& DtMissileDistractionPSR::verifiedDistractionsList | ( | ) | const [virtual] |
The list of countermeasure object names that have been checked and verified by the missile that they did not distract it.
| virtual bool DtMissileDistractionPSR::findCounterMeasure | ( | const DtString & | objectName | ) | const [virtual] |
Returns true if the countermeasure is on the verified list.
| virtual void DtMissileDistractionPSR::addCounterMeasure | ( | const DtString & | objectName | ) | [virtual] |
| virtual void DtMissileDistractionPSR::removeCounterMeasure | ( | const DtString & | objectName | ) | [virtual] |
| virtual void DtMissileDistractionPSR::clearVerifiedDistractionsList | ( | ) | [virtual] |
Empties the verified Distractions List.
| virtual void DtMissileDistractionPSR::putSelf | ( | FILE * | fp, |
| int | indentLevel = 0, |
||
| bool | writeUnspecified = false, |
||
| const DtFilename & | path = DtReaderWriter::appPath() |
||
| ) | [virtual] |
Override to call mapTargetIdsToTargetNames() before calling base class version to write ourselves to file.
It fills out our writable list of target object names from the non-writable myPreviousTargets list of DtEntityIdentifiers. This way the identities of previously detected targets get preserved as part of a checkpoint save.
Reimplemented from DtReaderWriter.
| virtual void DtMissileDistractionPSR::getSelf | ( | DtlObjPtr | args, |
| const DtFilename & | searchPath, | ||
| const DtVariableBindingsList & | variableBindings | ||
| ) | [virtual] |
Override to set flag indicating we should map target names to target identifiers the next time lookupPreviousTarget() is called.
Reimplemented from DtVrfProcessStateRepository.
| static DtVrfProcessStateRepository* DtMissileDistractionPSR::creator | ( | const DtString & | rwName, |
| DtVrfObject * | vrfObject, | ||
| DtReaderWriterRegistry * | parentRegistry | ||
| ) | [static] |
Returns a newly created instance of this class.
DtRwBoolean DtMissileDistractionPSR::myAmDistracted [protected] |
Keep track if the missile has been distracted and has retargeted.
If this is the case, we don't need to keep evaluateing the other countermeasures. We've already been fooled.
std::set<DtString> DtMissileDistractionPSR::myVerifiedDistractionsList [protected] |
This list keeps track of which countermeasures have already been tested and found to not distract the missile away from the target.
Stores the object name of the countermeasure.