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
DtInteractionDecoderFactory Class Reference

Instances of DtInteractionDecoderFactory are used to create decoders which know how to decode an HLA interaction message (or network representation) into an interaction repository (or host representation). More...

+ Inheritance diagram for DtInteractionDecoderFactory:
+ Collaboration diagram for DtInteractionDecoderFactory:

Public Member Functions

 DtInteractionDecoderFactory (DtExerciseConn *exConn)
 constructor
virtual ~DtInteractionDecoderFactory ()
 destructor
 DtInteractionDecoderFactory (const DtInteractionDecoderFactory &orig)
 copy constructor Copies across added decoder creation functions.
DtInteractionDecoderFactoryoperator= (const DtInteractionDecoderFactory &orig)
 assignment operator Copies across added decoder creation functions.
virtual DtInteractionDecodercreateDecoder (RTI::InteractionClassHandle hand)
 Create a decoder for the specified interaction class.
virtual DtInteractionDecoderaddDecoder (RTI::InteractionClassHandle hand, DtInteractionDecoder *decoder)
 Add a decoder prototype to the factory.
virtual void addParameterDecoder (RTI::InteractionClassHandle classHand, RTI::ParameterHandle paramHand, DtInteractionDecoder::DtParameterDecoder decoder, bool applyToSubclasses=true)
 This function is used to add a parameter decoder function to several prototype decoders all at once - namely, those associated with the interaction class denoted by hand, as well as all of its subclasses.
void addParameterDecoder (char *className, RTI::ParameterHandle paramHand, DtInteractionDecoder::DtParameterDecoder func, bool applyToSubclasses=true)
 Same as above, but identify class by name.
void addParameterDecoder (RTI::InteractionClassHandle classHand, char *paramName, DtInteractionDecoder::DtParameterDecoder func, bool applyToSubclasses=true)
 Same as above, but identify param by name.
void addParameterDecoder (char *className, char *paramName, DtInteractionDecoder::DtParameterDecoder func, bool applyToSubclasses=true)
 Same as above, but identify class and param by name.
virtual DtInteractionDecoderdecoder (RTI::InteractionClassHandle hand, bool copybase=false)
 Returns the decoder prototype associated with handle by a previous call to addDecoder.

Protected Types

typedef std::map
< RTI::InteractionClassHandle,
DtInteractionDecoder * > 
InterClassHandleToDecoderMap
 A list that maps class handles (DtIntHashKeys) to DtInteractionDecoder pointers.

Protected Attributes

InterClassHandleToDecoderMap myProtos
DtExerciseConnmyExConn

Detailed Description

Instances of DtInteractionDecoderFactory are used to create decoders which know how to decode an HLA interaction message (or network representation) into an interaction repository (or host representation).

Member Typedef Documentation

typedef std::map<RTI::InteractionClassHandle, DtInteractionDecoder *> DtInteractionDecoderFactory::InterClassHandleToDecoderMap
protected

A list that maps class handles (DtIntHashKeys) to DtInteractionDecoder pointers.

Constructor & Destructor Documentation

DtInteractionDecoderFactory::DtInteractionDecoderFactory ( DtExerciseConn exConn)

constructor

virtual DtInteractionDecoderFactory::~DtInteractionDecoderFactory ( )
virtual

destructor

DtInteractionDecoderFactory::DtInteractionDecoderFactory ( const DtInteractionDecoderFactory orig)

copy constructor Copies across added decoder creation functions.

Member Function Documentation

virtual DtInteractionDecoder* DtInteractionDecoderFactory::addDecoder ( RTI::InteractionClassHandle  hand,
DtInteractionDecoder 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 void DtInteractionDecoderFactory::addParameterDecoder ( RTI::InteractionClassHandle  classHand,
RTI::ParameterHandle  paramHand,
DtInteractionDecoder::DtParameterDecoder  decoder,
bool  applyToSubclasses = true 
)
virtual

This function is used to add a parameter decoder function to several prototype decoders 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 decoder prototype, making it equivalent to decoder(hand)->addDecoder(hand, decoder));

void DtInteractionDecoderFactory::addParameterDecoder ( char *  className,
RTI::ParameterHandle  paramHand,
DtInteractionDecoder::DtParameterDecoder  func,
bool  applyToSubclasses = true 
)

Same as above, but identify class by name.

void DtInteractionDecoderFactory::addParameterDecoder ( RTI::InteractionClassHandle  classHand,
char *  paramName,
DtInteractionDecoder::DtParameterDecoder  func,
bool  applyToSubclasses = true 
)

Same as above, but identify param by name.

void DtInteractionDecoderFactory::addParameterDecoder ( char *  className,
char *  paramName,
DtInteractionDecoder::DtParameterDecoder  func,
bool  applyToSubclasses = true 
)

Same as above, but identify class and param by name.

virtual DtInteractionDecoder* DtInteractionDecoderFactory::createDecoder ( RTI::InteractionClassHandle  hand)
virtual

Create a decoder for the specified interaction class.

Note: Caller is responsible for deleting. Returns NULL if decoder creation function is not in the factory.

virtual DtInteractionDecoder* DtInteractionDecoderFactory::decoder ( RTI::InteractionClassHandle  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 a 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.

DtInteractionDecoderFactory& DtInteractionDecoderFactory::operator= ( const DtInteractionDecoderFactory orig)

assignment operator Copies across added decoder creation functions.

Member Data Documentation

DtExerciseConn* DtInteractionDecoderFactory::myExConn
protected
InterClassHandleToDecoderMap DtInteractionDecoderFactory::myProtos
protected

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

Document ID: Generated on Fri May 15 06:36:13 EDT 2015 from SVN revision 153263
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)