![]() |
VR-Link API Documentation for HLA 1516
|
Instances of DtStateEncoderFactory are used to create encoders which know how to encode a state repository (or host representation) into an HLA state message (or network representation). More...
Inheritance diagram for DtStateEncoderFactory:
Collaboration diagram for DtStateEncoderFactory:Public Member Functions | |
| DtStateEncoderFactory (DtExerciseConn *exConn) | |
| constructor | |
| DtStateEncoderFactory (DtFom *fom) | |
| constructor | |
| virtual | ~DtStateEncoderFactory () |
| destructor | |
| virtual DtHlaStateEncoder * | createEncoder (RTI::ObjectClassHandle hand) |
| Create an encoder for the specified object class. | |
| virtual DtHlaStateEncoder * | addEncoder (RTI::ObjectClassHandle hand, DtHlaStateEncoder *encoder) |
| Add a encoder prototype to the factory. | |
| virtual void | addAttributeEncoder (RTI::ObjectClassHandle classHand, RTI::AttributeHandle attrHand, DtHlaStateEncoder::DtAttributeEncoder encoder, bool applyToSubclasses=true) |
| This function is used to add an attribute encoder function to several prototype encoders all at once - namely, those associated with the object class denoted by hand, as well as all of its subclasses. | |
| virtual void | addAttributeEncoder (char *className, RTI::AttributeHandle attrHand, DtHlaStateEncoder::DtAttributeEncoder func, bool applyToSubclasses=true) |
| Same as above, but identify class by name. | |
| virtual void | addAttributeEncoder (RTI::ObjectClassHandle classHand, char *attrName, DtHlaStateEncoder::DtAttributeEncoder func, bool applyToSubclasses=true) |
| Same as above, but identify attr by name. | |
| virtual void | addAttributeEncoder (char *className, char *attrName, DtHlaStateEncoder::DtAttributeEncoder func, bool applyToSubclasses=true) |
| Same as above, but identify class and attr by name. | |
| virtual void | addAttributeChecker (RTI::ObjectClassHandle classHand, RTI::AttributeHandle attrHand, DtHlaStateEncoder::DtAttributeChecker encoder, bool applyToSubclasses=true) |
| This function is used to add an attribute checker function to several prototype encoders all at once - namely, those associated with the object class denoted by hand, as well as all of its subclasses. | |
| virtual void | addAttributeChecker (char *className, RTI::AttributeHandle attrHand, DtHlaStateEncoder::DtAttributeChecker func, bool applyToSubclasses=true) |
| Same as above, but identify class by name. | |
| virtual void | addAttributeChecker (RTI::ObjectClassHandle classHand, char *attrName, DtHlaStateEncoder::DtAttributeChecker func, bool applyToSubclasses=true) |
| Same as above, but identify attr by name. | |
| virtual void | addAttributeChecker (char *className, char *attrName, DtHlaStateEncoder::DtAttributeChecker func, bool applyToSubclasses=true) |
| Same as above, but identify class and attr by name. | |
| virtual DtHlaStateEncoder * | encoder (RTI::ObjectClassHandle hand, bool copyBase=false) |
| Returns the encoder prototype associated with handle by a previous call to addEncoder. | |
Protected Types | |
| typedef std::map < RTI::ObjectClassHandle, DtHlaStateEncoder * > | ObjectClassHandleToEncoderMap |
Protected Attributes | |
| ObjectClassHandleToEncoderMap | myProtos |
| DtFom * | myFom |
Private Member Functions | |
| DtStateEncoderFactory (const DtStateEncoderFactory &orig) | |
| copy constructor - not implemented. | |
| DtStateEncoderFactory & | operator= (const DtStateEncoderFactory &orig) |
| assignment operator - not implemented. | |
Instances of DtStateEncoderFactory are used to create encoders which know how to encode a state repository (or host representation) into an HLA state message (or network representation).
typedef std::map<RTI::ObjectClassHandle, DtHlaStateEncoder*> DtStateEncoderFactory::ObjectClassHandleToEncoderMap [protected] |
constructor
constructor
| virtual DtStateEncoderFactory::~DtStateEncoderFactory | ( | ) | [virtual] |
destructor
| DtStateEncoderFactory::DtStateEncoderFactory | ( | const DtStateEncoderFactory & | orig | ) | [private] |
copy constructor - not implemented.
| virtual void DtStateEncoderFactory::addAttributeChecker | ( | RTI::ObjectClassHandle | classHand, |
| RTI::AttributeHandle | attrHand, | ||
| DtHlaStateEncoder::DtAttributeChecker | encoder, | ||
| bool | applyToSubclasses = true |
||
| ) | [virtual] |
This function is used to add an attribute checker function to several prototype encoders all at once - namely, those associated with the object class denoted by hand, as well as all of its subclasses.
If applyToSubclasses is false, then the function is only registered with the one encoder prototype, making it equivalent to encoder(hand)->addChecker(hand, encoder));
| virtual void DtStateEncoderFactory::addAttributeChecker | ( | char * | className, |
| RTI::AttributeHandle | attrHand, | ||
| DtHlaStateEncoder::DtAttributeChecker | func, | ||
| bool | applyToSubclasses = true |
||
| ) | [virtual] |
Same as above, but identify class by name.
| virtual void DtStateEncoderFactory::addAttributeChecker | ( | RTI::ObjectClassHandle | classHand, |
| char * | attrName, | ||
| DtHlaStateEncoder::DtAttributeChecker | func, | ||
| bool | applyToSubclasses = true |
||
| ) | [virtual] |
Same as above, but identify attr by name.
| virtual void DtStateEncoderFactory::addAttributeChecker | ( | char * | className, |
| char * | attrName, | ||
| DtHlaStateEncoder::DtAttributeChecker | func, | ||
| bool | applyToSubclasses = true |
||
| ) | [virtual] |
Same as above, but identify class and attr by name.
| virtual void DtStateEncoderFactory::addAttributeEncoder | ( | RTI::ObjectClassHandle | classHand, |
| RTI::AttributeHandle | attrHand, | ||
| DtHlaStateEncoder::DtAttributeEncoder | encoder, | ||
| bool | applyToSubclasses = true |
||
| ) | [virtual] |
This function is used to add an attribute encoder function to several prototype encoders all at once - namely, those associated with the object class denoted by hand, as well as all of its subclasses.
If applyToSubclasses is false, then the function is only registered with the one encoder prototype, making it equivalent to encoder(hand)->addEncoder(hand, encoder));
| virtual void DtStateEncoderFactory::addAttributeEncoder | ( | char * | className, |
| RTI::AttributeHandle | attrHand, | ||
| DtHlaStateEncoder::DtAttributeEncoder | func, | ||
| bool | applyToSubclasses = true |
||
| ) | [virtual] |
Same as above, but identify class by name.
| virtual void DtStateEncoderFactory::addAttributeEncoder | ( | RTI::ObjectClassHandle | classHand, |
| char * | attrName, | ||
| DtHlaStateEncoder::DtAttributeEncoder | func, | ||
| bool | applyToSubclasses = true |
||
| ) | [virtual] |
Same as above, but identify attr by name.
| virtual void DtStateEncoderFactory::addAttributeEncoder | ( | char * | className, |
| char * | attrName, | ||
| DtHlaStateEncoder::DtAttributeEncoder | func, | ||
| bool | applyToSubclasses = true |
||
| ) | [virtual] |
Same as above, but identify class and attr by name.
| virtual DtHlaStateEncoder* DtStateEncoderFactory::addEncoder | ( | RTI::ObjectClassHandle | hand, |
| DtHlaStateEncoder * | encoder | ||
| ) | [virtual] |
Add a encoder prototype to the factory.
The encoder prototype will be cloned by createEncoder when called for the appropriate handle. Caller deletes the encoder, but AFTER the encoder factory no longer needs it. Returns any previous encoder which was replaced by the add.
| virtual DtHlaStateEncoder* DtStateEncoderFactory::createEncoder | ( | RTI::ObjectClassHandle | hand | ) | [virtual] |
Create an encoder for the specified object class.
Note: Caller is responsible for deleting. Returns NULL if encoder creation function is not in the factory.
| virtual DtHlaStateEncoder* DtStateEncoderFactory::encoder | ( | RTI::ObjectClassHandle | hand, |
| bool | copyBase = false |
||
| ) | [virtual] |
Returns the encoder prototype associated with handle by a previous call to addEncoder.
If there is no encoder registered with hand, and if copyBase is true, then rather than returning NULL, we try to find an encoder that can be used for hand by searching up the class hierarchy for the most specific superclass that has an encoder registered with it. We make a clone of this encoder and associate it with hand, and return this clone. If necessary, we also associate clones with the classes in between hand and the ancestor whose encoder we are cloning. If no encoders for any superclasses can be found, we return NULL.
| DtStateEncoderFactory& DtStateEncoderFactory::operator= | ( | const DtStateEncoderFactory & | orig | ) | [private] |
assignment operator - not implemented.
DtFom* DtStateEncoderFactory::myFom [protected] |