![]() |
VR-Link API Documentation for HLA 1.3
|
Instances of DtFomMapper are used to provide FOM agility in VR-Link by mapping VR-Link classes and functionality to FOM classes, attributes and parameters. More...
Inheritance diagram for DtFomMapper:
Collaboration diagram for DtFomMapper:Classes | |
| struct | DtInteractionClassChooserInfo |
| struct | DtObjectClassChooserInfo |
Public Types | |
| typedef char *(* | DtInteractionClassChooser )(DtExerciseConn *exConn, const DtInteraction &inter) |
| A function that chooses an interaction class from the FOM based on the contents of a derived DtInteraction object. | |
| typedef char *(* | DtInteractionClassChooserWithUsrData )(DtExerciseConn *exConn, const DtInteraction &inter, void *usr) |
| Same as DtInteractionClassChooser but allows a user to specify a void* to be passed as user data. | |
| typedef char *(* | DtObjectClassChooser )(const char *vrlinkClassName, DtExerciseConn *conn, void *fomClassSpecific) |
| A function that chooses an object class from the FOM based based on the name of a C++ class derived from DtObjectPublisher and FOM class specific data deemed relevant by the publisher class (e.g. | |
| typedef char *(* | DtObjectClassChooserWithUsrData )(const char *vrlinkClassName, DtExerciseConn *conn, void *fomClassSpecific, void *usr) |
| Same as DtObjectClassChooser but allows a user to specify a void* to be passed as user data. | |
| typedef std::map< DtString, std::set< DtString > > | DtStringSetMap |
Public Member Functions | |
| DtFomMapper () | |
| Default constructor. | |
| virtual | ~DtFomMapper () |
| destructor | |
| virtual DtStateDecoderFactory * | setStateDecoderFactory (DtStateDecoderFactory *fact) |
| Set/Get the current factory that can be used to create DtHlaStateDecoders. | |
| virtual DtStateDecoderFactory * | stateDecoderFactory () |
| virtual DtStateEncoderFactory * | setStateEncoderFactory (DtStateEncoderFactory *fact) |
| Set/Get the current factory that can be used to create DtHlaStateEncoders. | |
| virtual DtStateEncoderFactory * | stateEncoderFactory () |
| virtual DtInteractionDecoderFactory * | setInteractionDecoderFactory (DtInteractionDecoderFactory *fact) |
| Set/Get the current factory that can be used to create DtInteractionDecoders. | |
| virtual DtInteractionDecoderFactory * | interactionDecoderFactory () |
| virtual DtInteractionEncoderFactory * | setInteractionEncoderFactory (DtInteractionEncoderFactory *fact) |
| Set/Get the current factory that can be used to create DtInteractionEncoders. | |
| virtual DtInteractionEncoderFactory * | interactionEncoderFactory () |
| virtual DtHlaObjectFactory * | setHlaObjectFactory (DtHlaObjectFactory *fact) |
| Set/Get the current factory that can be used to create DtHlaObjects. | |
| virtual DtHlaObjectFactory * | hlaObjectFactory () |
| virtual DtInteractionFactory * | setInteractionFactory (DtInteractionFactory *fact) |
| Set/Get the current factory that can be used to create DtInteractions. | |
| virtual DtInteractionFactory * | interactionFactory () |
| virtual void | setObjectClassToChoose (const char *vrlinkClassName, const char *fomClassName) |
| Tell the FOM Mapper how to choose a FOM object class to use for objects being published by a particular kind of object publisher. | |
| virtual void | setObjectClassChooser (const char *vrlinkClassName, DtObjectClassChooser chooser) |
| virtual void | setObjectClassChooser (const char *vrlinkClassName, DtObjectClassChooserWithUsrData chooser, void *usr) |
| virtual const char * | chooseObjectClass (const char *vrlinkClassName, void *fomClassSpecific=NULL) const |
| Chooses an object class to represent an object managed by the C++ class named vrlinkClassName (which should be a class derived from DtObjectPublisher). | |
| virtual void | setInteractionClassToChoose (const char *vrlinkClassName, const char *fomClassName) |
| Tell the FOM Mapper how to choose a FOM interaction class to use for a particular kind of derived DtInteraction. | |
| virtual void | setInteractionClassChooser (const char *vrlinkClassName, DtInteractionClassChooser chooser) |
| virtual void | setInteractionClassChooser (const char *vrlinkClassName, DtInteractionClassChooserWithUsrData chooser, void *usr) |
| virtual const char * | chooseInteractionClass (const DtInteraction &inter) const |
| Chooses a FOM interaction class to be by a particular derived DtInteraction class named vrlinkClassName. | |
| virtual void | setInteractionClasses (const char *vrlinkClassName, const std::set< DtString > &classes) |
| Set/Get a list of names (char*) of FOM classes that can be decoded into the derived DtInteraction class whose name is name. | |
| virtual const std::set < DtString > * | interactionClasses (const char *vrlinkClassName) |
| virtual void | setInteractionClass (const char *vrlinkClassName, const char *fomClassName) |
| When there is only a single FOM class to be associated with a VR-Link interaction class, then there is no need to create a DtList. | |
| virtual void | addInteractionClassName (const char *vrlinkClassName, const char *objClassName, bool includeSubclasses) |
| Modify the list of names of FOM interactions that should be subscribed to by a particular subclass of VR-Link. | |
| virtual void | removeInteractionClassName (const char *vrlinkClassName, const char *objClassName, bool includeSubclasses) |
| virtual void | setObjectClassNames (const char *vrlinkClassName, const std::set< DtString > &classes) |
| Set/Get a list of names (char*) of FOM object classes that should be subscribed to by a particular subclass of VR-Link's DtReflectedObjectList. | |
| virtual const std::set < DtString > * | objectClassNames (const char *vrlinkClassName) |
| virtual DtList * | objectClassHandles (const char *vrlinkClassName) |
| Similar to objectClassNames, but returns a DtList of ObjectClassHandles instead. | |
| virtual void | setObjectClass (const char *vrlinkClassName, const char *fomClassName) |
| When there is only a single FOM class to be associated with a VR-Link DtReflectedObjectList class, then there is no need to create a DtList. | |
| virtual void | addObjectClassName (const char *vrlinkClassName, const char *objClassName, bool includeSubclasses) |
| Modify the list of names of FOM objects that should be subscribed to by a particular subclass of VR-Link. | |
| virtual void | removeObjectClassName (const char *vrlinkClassName, const char *objClassName, bool includeSubclasses) |
| virtual void | init (DtExerciseConn *conn)=0 |
| Initialize the instance, once an exercise connection is available. | |
| virtual void | setVersion (double vers) |
| Returns the version number of the FOM, as passed to setVersion. | |
| virtual double | version () const |
| virtual void | setRevision (int val) |
| Sets the revision number of the FOM. | |
| virtual int | revision () const |
| Returns the revision number of the FOM. | |
| virtual const DtObjectClassChooserInfo * | objectClassChooser (const char *vrlinkClassName) const |
| Return the FOM-class-chooser function, if any, that has been associated with the name of a C++ class derived from DtObjectPublisher using setObjectClassChooser. | |
| virtual const DtInteractionClassChooserInfo * | interactionClassChooser (const char *vrlinkClassName) const |
| Return the FOM-class-chooser function, if any, that has been associated with the name of a C++ class derived from DtInteraction using setInteractionClassChooser. | |
Protected Member Functions | |
| DtFomMapper (const DtFomMapper &orig) | |
| copy constructor - not implemented. | |
| DtFomMapper & | operator= (const DtFomMapper &orig) |
| assignment operator - not implemented. | |
Protected Attributes | |
| DtExerciseConn * | myExConn |
| DtStateDecoderFactory * | myDecFact |
| Current factories and other objects. | |
| DtStateEncoderFactory * | myEncFact |
| DtInteractionDecoderFactory * | myInterDecFact |
| DtInteractionEncoderFactory * | myInterEncFact |
| DtHlaObjectFactory * | myObjFact |
| DtInteractionFactory * | myInterFact |
| DtStringSetMap | myIntMapList |
| Maps of the names of C++ classes derived from DtInteraction to sets of names of FOM classes. | |
| DtStringSetMap | myObjMapList |
| Maps of the names of C++ classes derived from DtReflectedObjectList to sets of names of FOM classes. | |
| std::map< DtString, DtObjectClassChooserInfo > | myObjChooserList |
| Maps names of C++ classes derived from DtObjectPublisher to DtObjectClassChoosers - functions that can choose an object class name from the FOM to use for the object. | |
| std::map< DtString, DtString > | mySimpleObjChooserList |
| Maps names of C++ classes derived from DtObjectPublisher to single FOM object class names. | |
| std::map< DtString, DtInteractionClassChooserInfo > | myInterChooserList |
| Maps names of C++ classes derived from DtInteraction to DtInteractionClassChoosers - functions that can choose an interaction class name from the FOM to use for the interaction. | |
| std::map< DtString, DtString > | mySimpleInterChooserList |
| Maps names of C++ classes derived from DtInteraction to single FOM object class names. | |
| DtList | myObjHandleList |
| The object returned by objectClassHandles. | |
| DtList | myEmptyList |
| Just an empty list to return when no class list has been registered for a particular VR-Link class. | |
| double | myVersion |
| int | myRevision |
Instances of DtFomMapper are used to provide FOM agility in VR-Link by mapping VR-Link classes and functionality to FOM classes, attributes and parameters.
DtFomMapper is an abstract class. Most FOM Mappers (including DtRprFomMapper) are derived from DtEmptyFomMapper, and not directly from DtFomMapper.
| typedef char*(* DtFomMapper::DtInteractionClassChooser)(DtExerciseConn *exConn, const DtInteraction &inter) |
A function that chooses an interaction class from the FOM based on the contents of a derived DtInteraction object.
| typedef char*(* DtFomMapper::DtInteractionClassChooserWithUsrData)(DtExerciseConn *exConn, const DtInteraction &inter, void *usr) |
Same as DtInteractionClassChooser but allows a user to specify a void* to be passed as user data.
The user data pointer is specified when the class chooser is registered.
| typedef char*(* DtFomMapper::DtObjectClassChooser)(const char *vrlinkClassName, DtExerciseConn *conn, void *fomClassSpecific) |
A function that chooses an object class from the FOM based based on the name of a C++ class derived from DtObjectPublisher and FOM class specific data deemed relevant by the publisher class (e.g.
entity type).
| typedef char*(* DtFomMapper::DtObjectClassChooserWithUsrData)(const char *vrlinkClassName, DtExerciseConn *conn, void *fomClassSpecific, void *usr) |
Same as DtObjectClassChooser but allows a user to specify a void* to be passed as user data.
The user data pointer is specified when the class chooser is registered.
| typedef std::map<DtString, std::set<DtString> > DtFomMapper::DtStringSetMap |
| DtFomMapper::DtFomMapper | ( | ) |
Default constructor.
Typically, most initialization takes place within init(), which is called by DtExerciseConn's constructor.
|
virtual |
destructor
|
protected |
copy constructor - not implemented.
|
virtual |
Modify the list of names of FOM interactions that should be subscribed to by a particular subclass of VR-Link.
If includeSubclasses is set to true, this function will recurse through all child FOM classes of that type.
|
virtual |
Modify the list of names of FOM objects that should be subscribed to by a particular subclass of VR-Link.
If includeSubclasses is set to true, this function will recurse through all child FOM classes of that type.
|
virtual |
Chooses a FOM interaction class to be by a particular derived DtInteraction class named vrlinkClassName.
|
virtual |
Chooses an object class to represent an object managed by the C++ class named vrlinkClassName (which should be a class derived from DtObjectPublisher).
fomClassSpecific is additional data deemed relevant to make the choice by the publisher class (e.g. entity type). It is passed as fomClassSpecific to a chooser function that has been registered with the FOM Mapper for this publisher type, if any.
|
virtual |
|
pure virtual |
Initialize the instance, once an exercise connection is available.
Must be overridden in subclasses.
Implemented in DtRprFomMapper, MyFomMapper, and DtEmptyFomMapper.
|
virtual |
Return the FOM-class-chooser function, if any, that has been associated with the name of a C++ class derived from DtInteraction using setInteractionClassChooser.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Return the FOM-class-chooser function, if any, that has been associated with the name of a C++ class derived from DtObjectPublisher using setObjectClassChooser.
|
virtual |
Similar to objectClassNames, but returns a DtList of ObjectClassHandles instead.
The returned list is owned by the DtFomMapper, and should not be deleted. In addition, it is only valid until the next call to this function. If using HLA 1.3 the ObjectClassHandles are returned cast as void * in the list If using HLA 1516 the list contains pointers to a valid RTI::ObjectClassHandle
|
virtual |
|
protected |
assignment operator - not implemented.
|
virtual |
|
virtual |
|
virtual |
Returns the revision number of the FOM.
A revision is defined as a particular way that the FOM Mapper translates a specific FOM. In general, it increases when we there is a bug in translation that cannot be fixed without breaking backwards compatibility. For this reason, it is recommended that one uses the latest revision number available for your specific FOM.
|
virtual |
Set/Get the current factory that can be used to create DtHlaObjects.
|
virtual |
When there is only a single FOM class to be associated with a VR-Link interaction class, then there is no need to create a DtList.
Just use this:
|
virtual |
|
virtual |
|
virtual |
Set/Get a list of names (char*) of FOM classes that can be decoded into the derived DtInteraction class whose name is name.
These classes will be subscribed to, when you use a derived DtInteraction's addCallback function. The DtFomMapper copies the data in the list passed to setInteractionClasses, so the object can be deleted at the caller's leisure. The list returned by interactionClasses is owned by the DtFomMapper and shouldn't be deleted by the caller.
|
virtual |
Tell the FOM Mapper how to choose a FOM interaction class to use for a particular kind of derived DtInteraction.
You can either associate a single FOM class name, or a FOM class choosing function with the name of a C++ class derived from DtInteraction.
|
virtual |
Set/Get the current factory that can be used to create DtInteractionDecoders.
|
virtual |
Set/Get the current factory that can be used to create DtInteractionEncoders.
|
virtual |
Set/Get the current factory that can be used to create DtInteractions.
|
virtual |
When there is only a single FOM class to be associated with a VR-Link DtReflectedObjectList class, then there is no need to create a DtList.
Just use this:
|
virtual |
|
virtual |
|
virtual |
Set/Get a list of names (char*) of FOM object classes that should be subscribed to by a particular subclass of VR-Link's DtReflectedObjectList.
vrlinkClassName is the name of the DtReflectedObjectList subclass for which you are creating a mapping. The DtFomMapper copies the data in the list passed to setObjectClassNames, so the object can be deleted at the caller's leisure. The list returned by objectClassNames is owned by the DtFomMapper and shouldn't be deleted by the caller.
|
virtual |
Tell the FOM Mapper how to choose a FOM object class to use for objects being published by a particular kind of object publisher.
You can either associate a single FOM class name, or a FOM class choosing function with the name of a C++ class derived from DtObjectPublisher.
|
virtual |
Sets the revision number of the FOM.
A revision is defined as a particular way that the FOM Mapper translates the FOM. In general, it increases when we there is a bug in translation that cannot be fixed without breaking backwards compatibility. For this reason, it is recommended that one uses the latest revision number available for your specific FOM.
|
virtual |
Set/Get the current factory that can be used to create DtHlaStateDecoders.
|
virtual |
Set/Get the current factory that can be used to create DtHlaStateEncoders.
|
virtual |
Returns the version number of the FOM, as passed to setVersion.
A Version is defined as a specific type of FOM file. For example, RPR Version 2.0 Draft 17 is defined as version 2.0017. This can be used jointly with the revision to define both what the FOM being read is as well as how to interpret it.
|
virtual |
|
virtual |
|
virtual |
|
protected |
Current factories and other objects.
|
protected |
Just an empty list to return when no class list has been registered for a particular VR-Link class.
|
protected |
|
protected |
|
protected |
Maps names of C++ classes derived from DtInteraction to DtInteractionClassChoosers - functions that can choose an interaction class name from the FOM to use for the interaction.
|
protected |
|
protected |
|
protected |
|
protected |
Maps of the names of C++ classes derived from DtInteraction to sets of names of FOM classes.
|
protected |
Maps names of C++ classes derived from DtObjectPublisher to DtObjectClassChoosers - functions that can choose an object class name from the FOM to use for the object.
|
protected |
|
protected |
The object returned by objectClassHandles.
It is reused and overwritten each call.
|
protected |
Maps of the names of C++ classes derived from DtReflectedObjectList to sets of names of FOM classes.
|
protected |
Maps names of C++ classes derived from DtInteraction to single FOM object class names.
Maps names of C++ classes derived from DtObjectPublisher to single FOM object class names.
|
protected |