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

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 DtHlaStateEncodercreateEncoder (RTI::ObjectClassHandle hand)
 Create an encoder for the specified object class.
virtual DtHlaStateEncoderaddEncoder (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 DtHlaStateEncoderencoder (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
DtFommyFom

Private Member Functions

 DtStateEncoderFactory (const DtStateEncoderFactory &orig)
 copy constructor - not implemented.
DtStateEncoderFactoryoperator= (const DtStateEncoderFactory &orig)
 assignment operator - not implemented.

Detailed Description

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

Member Typedef Documentation

typedef std::map<RTI::ObjectClassHandle, DtHlaStateEncoder*> DtStateEncoderFactory::ObjectClassHandleToEncoderMap
protected

Constructor & Destructor Documentation

DtStateEncoderFactory::DtStateEncoderFactory ( DtExerciseConn exConn)

constructor

DtStateEncoderFactory::DtStateEncoderFactory ( DtFom fom)

constructor

virtual DtStateEncoderFactory::~DtStateEncoderFactory ( )
virtual

destructor

DtStateEncoderFactory::DtStateEncoderFactory ( const DtStateEncoderFactory orig)
private

copy constructor - not implemented.

Member Function Documentation

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.

Member Data Documentation

DtFom* DtStateEncoderFactory::myFom
protected
ObjectClassHandleToEncoderMap DtStateEncoderFactory::myProtos
protected

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

Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (www.mak.com)