![]() |
VR-Forces 4.0.4 Class Documentation
|
DtSimCommand which changes the hostility of two forces. More...

Public Member Functions | |
| DtChangeHostilityCommand () | |
| Default constructor. | |
| DtChangeHostilityCommand (const DtString &writeName, DtReaderWriterRegistry *parentRegistry=NULL) | |
| Usual constructor. | |
| DtChangeHostilityCommand (const DtString &writeName, const DtChangeHostilityCommand &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| copy constructor | |
| virtual | ~DtChangeHostilityCommand () |
| destructor | |
| DtChangeHostilityCommand & | operator= (const DtChangeHostilityCommand &orig) |
| assignment operator | |
| int | type () const |
| virtual DtSimCommand * | clone (const DtString &name, DtReaderWriterRegistry *parentRegistry=0) const |
| virtual DtString | stringRep () const |
| Text representation of this command. | |
| virtual int | netRepSize () const |
| Returns the size in bytes of the network representation of the class. | |
| virtual bool | setFromNet (const char *contentBuffer, unsigned contentSize) |
| Sets mySubsimCommand member from the incoming contentBuffer (cast to type DtNetSimSimCommand). | |
| virtual bool | setToNet () |
| Calls netRep() to create the network buffer. | |
| virtual void | setForceOne (const DtForceType &force) |
| Force whose perspective is being set. | |
| virtual DtForceType | forceOne () const |
| Force whose perspective is being set. | |
| virtual void | setForceTwo (const DtForceType &force) |
| The target force of the change. | |
| virtual DtForceType | forceTwo () const |
| The target force of the change. | |
| virtual void | setHostile (bool yesNo) |
| The new state of the hostility of force one to force two. | |
| virtual bool | hostile () const |
| The new state of the hostility of force one to force two. | |
Static Public Member Functions | |
| static DtSimCommand * | creator () |
| Returns a new instance of this class. | |
Protected Attributes | |
| DtRwForceType | myForceOne |
| DtRwForceType | myForceTwo |
| DtRwBoolean | myHostile |
DtSimCommand which changes the hostility of two forces.
This command will give forceOne a new hostility perspective on forceTwo. Keep in mind that hostility is not necessarily reciprocal.
Default constructor.
| DtChangeHostilityCommand::DtChangeHostilityCommand | ( | const DtString & | writeName, |
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
Usual constructor.
| DtChangeHostilityCommand::DtChangeHostilityCommand | ( | const DtString & | writeName, |
| const DtChangeHostilityCommand & | orig, | ||
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
copy constructor
| virtual DtChangeHostilityCommand::~DtChangeHostilityCommand | ( | ) | [virtual] |
destructor
| DtChangeHostilityCommand& DtChangeHostilityCommand::operator= | ( | const DtChangeHostilityCommand & | orig | ) |
assignment operator
| int DtChangeHostilityCommand::type | ( | ) | const [virtual] |
Implements DtSimCommand.
| virtual DtSimCommand* DtChangeHostilityCommand::clone | ( | const DtString & | name, |
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | const [virtual] |
Implements DtSimCommand.
| virtual void DtChangeHostilityCommand::setForceOne | ( | const DtForceType & | force | ) | [virtual] |
Force whose perspective is being set.
| virtual DtForceType DtChangeHostilityCommand::forceOne | ( | ) | const [virtual] |
Force whose perspective is being set.
| virtual void DtChangeHostilityCommand::setForceTwo | ( | const DtForceType & | force | ) | [virtual] |
The target force of the change.
| virtual DtForceType DtChangeHostilityCommand::forceTwo | ( | ) | const [virtual] |
The target force of the change.
| virtual void DtChangeHostilityCommand::setHostile | ( | bool | yesNo | ) | [virtual] |
The new state of the hostility of force one to force two.
| virtual bool DtChangeHostilityCommand::hostile | ( | ) | const [virtual] |
The new state of the hostility of force one to force two.
| virtual DtString DtChangeHostilityCommand::stringRep | ( | ) | const [virtual] |
Text representation of this command.
Implements DtSimCommand.
| virtual int DtChangeHostilityCommand::netRepSize | ( | ) | const [virtual] |
Returns the size in bytes of the network representation of the class.
This is the size in bytes of the DtNetSimSimCommand structure. Derived classes should take into acount the size returned by this class when overriding (they should call down to this class and add the result to their additional size).
Reimplemented from DtSimCommand.
| virtual bool DtChangeHostilityCommand::setFromNet | ( | const char * | contentBuffer, |
| unsigned | contentSize | ||
| ) | [virtual] |
Sets mySubsimCommand member from the incoming contentBuffer (cast to type DtNetSimSimCommand).
Derived classes should call down to this function first, and then extract their own data starting at the location contentBuffer + DtSimCommand::netRepSize().
Reimplemented from DtSimCommand.
| virtual bool DtChangeHostilityCommand::setToNet | ( | ) | [virtual] |
Calls netRep() to create the network buffer.
Casts the resulting myNetRep to type DtNetSimSimCommand*, and then sets the mySubsimCommand member in the DtNetSimSimCommand from mySubsimCommand. Derived classes should call down to the base class version of setToNet() at the start of the function (before doing any processing on the network representation) They can then start to fill in their network data, starting at the location myNetRep + DtSimCommand::netRepSize().
Reimplemented from DtSimCommand.
| static DtSimCommand* DtChangeHostilityCommand::creator | ( | ) | [static] |
Returns a new instance of this class.
DtRwForceType DtChangeHostilityCommand::myForceOne [protected] |
DtRwForceType DtChangeHostilityCommand::myForceTwo [protected] |
DtRwBoolean DtChangeHostilityCommand::myHostile [protected] |