VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Attributes | Private Member Functions
DtStateDecoderFactory Class Reference

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 DtHlaStateDecodercreateDecoder (RTI::ObjectClassHandle hand)
 Create a decoder for the specified object class.
virtual DtHlaStateDecoderaddDecoder (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 DtHlaStateDecoderdecoder (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
DtFommyFom

Private Member Functions

 DtStateDecoderFactory (const DtStateDecoderFactory &orig)
 copy constructor - not implemented
DtStateDecoderFactoryoperator= (const DtStateDecoderFactory &orig)
 assignment operator - not implemented

Detailed Description

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).

Member Typedef Documentation

typedef std::map<RTI::ObjectClassHandle, DtHlaStateDecoder*> DtStateDecoderFactory::ObjectClassHandleToStateDecoderMap
protected

Constructor & Destructor Documentation

DtStateDecoderFactory::DtStateDecoderFactory ( DtExerciseConn exConn)

constructor

DtStateDecoderFactory::DtStateDecoderFactory ( DtFom fom)

constructor

virtual DtStateDecoderFactory::~DtStateDecoderFactory ( )
virtual

destructor

DtStateDecoderFactory::DtStateDecoderFactory ( const DtStateDecoderFactory orig)
private

copy constructor - not implemented

Member Function Documentation

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

Member Data Documentation

DtFom* DtStateDecoderFactory::myFom
protected
ObjectClassHandleToStateDecoderMap DtStateDecoderFactory::myProtos
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Mon Feb 6 18:36:34 EST 2017 from SVN revision 173107
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)