VR-Link API Documentation for HLA 1.3
List of all members | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtInteractionFactory Class Reference

Instances of DtInteractionFactory are used to create derived DtInteractions based on Interaction Class. More...

+ Inheritance diagram for DtInteractionFactory:
+ Collaboration diagram for DtInteractionFactory:

Public Types

typedef DtInteraction *(* DtInteractionCreator )()
 Interaction creation function signature.

Public Member Functions

 DtInteractionFactory (DtExerciseConn *exConn)
 constructor
virtual ~DtInteractionFactory ()
 destructor
virtual DtInteractioncreateInteraction (RTI::InteractionClassHandle handle, const RTI::ParameterHandleValuePairSet &pairSet)
 Create the specified interaction.
virtual DtInteractionCreator addCreator (RTI::InteractionClassHandle handle, DtInteractionCreator creator)
 Add an interaction creation function to the factory.
virtual DtInteractionCreator addCreator (const char *className, DtInteractionCreator creator)
virtual DtInteractionCreator creator (RTI::InteractionClassHandle handle)

Protected Types

typedef std::map
< RTI::InteractionClassHandle,
DtInteractionCreator
InterClassHandleToCreatorMap

Protected Member Functions

 DtInteractionFactory (const DtInteractionFactory &orig)
 copy constructor - not implemented.
DtInteractionFactoryoperator= (const DtInteractionFactory &orig)
 assignment operator - not implemented.

Protected Attributes

InterClassHandleToCreatorMap myCreators
DtExerciseConnmyExConn

Detailed Description

Instances of DtInteractionFactory are used to create derived DtInteractions based on Interaction Class.

Member Typedef Documentation

typedef DtInteraction*(* DtInteractionFactory::DtInteractionCreator)()

Interaction creation function signature.

typedef std::map<RTI::InteractionClassHandle, DtInteractionCreator> DtInteractionFactory::InterClassHandleToCreatorMap
protected

Constructor & Destructor Documentation

DtInteractionFactory::DtInteractionFactory ( DtExerciseConn exConn)

constructor

virtual DtInteractionFactory::~DtInteractionFactory ( )
virtual

destructor

DtInteractionFactory::DtInteractionFactory ( const DtInteractionFactory orig)
protected

copy constructor - not implemented.

Member Function Documentation

virtual DtInteractionCreator DtInteractionFactory::addCreator ( RTI::InteractionClassHandle  handle,
DtInteractionCreator  creator 
)
virtual

Add an interaction creation function to the factory.

The function must return a new'ed interaction object which will be deleted by the user. Returns any previous interaction creation function which was replaced by the add. Second version registers the creator by name, rather than by handle.

virtual DtInteractionCreator DtInteractionFactory::addCreator ( const char *  className,
DtInteractionCreator  creator 
)
virtual
virtual DtInteraction* DtInteractionFactory::createInteraction ( RTI::InteractionClassHandle  handle,
const RTI::ParameterHandleValuePairSet &  pairSet 
)
virtual

Create the specified interaction.

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

virtual DtInteractionCreator DtInteractionFactory::creator ( RTI::InteractionClassHandle  handle)
virtual
DtInteractionFactory& DtInteractionFactory::operator= ( const DtInteractionFactory orig)
protected

assignment operator - not implemented.

Member Data Documentation

InterClassHandleToCreatorMap DtInteractionFactory::myCreators
protected
DtExerciseConn* DtInteractionFactory::myExConn
protected

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

Document ID: Generated on Wed Oct 23 22:25:48 EDT 2013 from SVN revision 132765
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)