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