![]() |
VR-Link API Documentation for HLA 1.3
|
Instances of DtInteractionEncoderFactory are used to create encoders which know how to encode an interaction repository (or host representation) into an HLA interaction message (or network representation). More...
Inheritance diagram for DtInteractionEncoderFactory:
Collaboration diagram for DtInteractionEncoderFactory:Public Member Functions | |
| DtInteractionEncoderFactory (DtExerciseConn *exConn) | |
| constructor | |
| virtual | ~DtInteractionEncoderFactory () |
| destructor | |
| virtual DtInteractionEncoder * | createEncoder (RTI::InteractionClassHandle hand) |
| Create an encoder for the specified interaction class. | |
| virtual DtInteractionEncoder * | addEncoder (RTI::InteractionClassHandle hand, DtInteractionEncoder *encoder) |
| Add an encoder prototype to the factory. | |
| virtual void | addParameterEncoder (RTI::InteractionClassHandle classHand, RTI::ParameterHandle paramHand, DtInteractionEncoder::DtParameterEncoder encoder, bool applyToSubclasses=true) |
| This function is used to add a parameter encoder function to several prototype encoders all at once - namely, those associated with the interaction class denoted by hand, as well as all of its subclasses. | |
| void | addParameterEncoder (char *className, RTI::ParameterHandle paramHand, DtInteractionEncoder::DtParameterEncoder func, bool applyToSubclasses=true) |
| Same as above, but identify class by name. | |
| void | addParameterEncoder (RTI::InteractionClassHandle classHand, char *paramName, DtInteractionEncoder::DtParameterEncoder func, bool applyToSubclasses=true) |
| Same as above, but identify param by name. | |
| void | addParameterEncoder (char *className, char *paramName, DtInteractionEncoder::DtParameterEncoder func, bool applyToSubclasses=true) |
| Same as above, but identify class and param by name. | |
| virtual DtInteractionEncoder * | encoder (RTI::InteractionClassHandle hand, bool copyBase=false) |
| Returns the encoder prototype associated with handle by a previous call to addEncoder. | |
Protected Types | |
| typedef std::map < RTI::InteractionClassHandle, DtInteractionEncoder * > | InterClassHandleToEncoderMap |
Protected Member Functions | |
| DtInteractionEncoderFactory (const DtInteractionEncoderFactory &orig) | |
| copy constructor - not implemented. | |
| DtInteractionEncoderFactory & | operator= (const DtInteractionEncoderFactory &orig) |
| assignment operator - not implemented. | |
Protected Attributes | |
| InterClassHandleToEncoderMap | myProtos |
| DtExerciseConn * | myExConn |
Instances of DtInteractionEncoderFactory are used to create encoders which know how to encode an interaction repository (or host representation) into an HLA interaction message (or network representation).
typedef std::map<RTI::InteractionClassHandle, DtInteractionEncoder*> DtInteractionEncoderFactory::InterClassHandleToEncoderMap [protected] |
constructor
| virtual DtInteractionEncoderFactory::~DtInteractionEncoderFactory | ( | ) | [virtual] |
destructor
| DtInteractionEncoderFactory::DtInteractionEncoderFactory | ( | const DtInteractionEncoderFactory & | orig | ) | [protected] |
copy constructor - not implemented.
| virtual DtInteractionEncoder* DtInteractionEncoderFactory::addEncoder | ( | RTI::InteractionClassHandle | hand, |
| DtInteractionEncoder * | encoder | ||
| ) | [virtual] |
Add an 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 void DtInteractionEncoderFactory::addParameterEncoder | ( | RTI::InteractionClassHandle | classHand, |
| RTI::ParameterHandle | paramHand, | ||
| DtInteractionEncoder::DtParameterEncoder | encoder, | ||
| bool | applyToSubclasses = true |
||
| ) | [virtual] |
This function is used to add a parameter encoder function to several prototype encoders all at once - namely, those associated with the interaction 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));
| void DtInteractionEncoderFactory::addParameterEncoder | ( | char * | className, |
| RTI::ParameterHandle | paramHand, | ||
| DtInteractionEncoder::DtParameterEncoder | func, | ||
| bool | applyToSubclasses = true |
||
| ) |
Same as above, but identify class by name.
| void DtInteractionEncoderFactory::addParameterEncoder | ( | RTI::InteractionClassHandle | classHand, |
| char * | paramName, | ||
| DtInteractionEncoder::DtParameterEncoder | func, | ||
| bool | applyToSubclasses = true |
||
| ) |
Same as above, but identify param by name.
| void DtInteractionEncoderFactory::addParameterEncoder | ( | char * | className, |
| char * | paramName, | ||
| DtInteractionEncoder::DtParameterEncoder | func, | ||
| bool | applyToSubclasses = true |
||
| ) |
Same as above, but identify class and param by name.
| virtual DtInteractionEncoder* DtInteractionEncoderFactory::createEncoder | ( | RTI::InteractionClassHandle | hand | ) | [virtual] |
Create an encoder for the specified interaction class.
Note: Caller is responsible for deleting. Returns NULL if encoder creation function is not in the factory.
| virtual DtInteractionEncoder* DtInteractionEncoderFactory::encoder | ( | RTI::InteractionClassHandle | 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.
| DtInteractionEncoderFactory& DtInteractionEncoderFactory::operator= | ( | const DtInteractionEncoderFactory & | orig | ) | [protected] |
assignment operator - not implemented.
DtExerciseConn* DtInteractionEncoderFactory::myExConn [protected] |