![]() |
VR-Link API Documentation for HLA 1516
|
The TestInteraction class is used to represent interactions of the FOM class "Test". More...
Inheritance diagram for TestInteraction:
Collaboration diagram for TestInteraction:Public Member Functions | |
| TestInteraction () | |
| Blank Constructor - constructs a blank TestInteraction ready to be filled out and sent by application code. | |
| virtual | ~TestInteraction () |
| Destructor Not required by VR-Link, but should clearly be written if this class has any dynamic data that needs to be cleaned up. | |
| TestInteraction (const TestInteraction &orig) | |
| Copy constructor. | |
| TestInteraction & | operator= (const TestInteraction &orig) |
| Assignment operator. | |
| virtual const char * | name () const |
| Virtual function override. | |
| virtual void | printData () const |
| Virtual function override. | |
| virtual void | setNumber (int num) |
| Set/Get the parameter named "Number". | |
| virtual int | number () const |
| virtual void | setVector (const DtVector &vec) |
| Set/Get the parameter named "Vector". | |
| virtual const DtVector & | vector () const |
Static Public Member Functions | |
| static DtInteraction * | create () |
| Create and return a new TestInteraction. | |
| static void | addCallback (DtExerciseConn *conn, TestInteractionCb cb, void *usr) |
| Wrappers around DtExerciseConn's add/removeCallback functions. | |
| static void | removeCallback (DtExerciseConn *conn, TestInteractionCb cb, void *usr) |
Protected Member Functions | |
| virtual char * | interactionClassToUse (DtExerciseConn *exConn) const |
| Virtual function override. | |
| virtual DtInteractionDecoder * | createDecoder (DtExerciseConn *exConn) const |
| Virtual function override. | |
| virtual DtInteractionEncoder * | createEncoder (DtExerciseConn *exConn) const |
| Virtual function override. | |
Protected Attributes | |
| int | myNum |
| DtVector | myVec |
The TestInteraction class is used to represent interactions of the FOM class "Test".
It has two parameters: "Number", which is represented by a 32-bit integer, and "Vector", which is represented by an array of three 64-bit floating point numbers (doubles).
Blank Constructor - constructs a blank TestInteraction ready to be filled out and sent by application code.
Required.
| virtual TestInteraction::~TestInteraction | ( | ) | [virtual] |
Destructor Not required by VR-Link, but should clearly be written if this class has any dynamic data that needs to be cleaned up.
| TestInteraction::TestInteraction | ( | const TestInteraction & | orig | ) |
Copy constructor.
Not required by VR-Link, but needed if you will ever want to copy TestInteractions.
| static void TestInteraction::addCallback | ( | DtExerciseConn * | conn, |
| TestInteractionCb | cb, | ||
| void * | usr | ||
| ) | [static] |
Wrappers around DtExerciseConn's add/removeCallback functions.
Not required since the DtExerciseConn functions may be used instead, but strongly encouraged, so that the non-typesafe cast can be limited to this one place. In addition, within add-callback, we choose to register the TestInteraction class with VR-Link, letting VR-Link know to create one of these to represent the right FOM class.
| static DtInteraction* TestInteraction::create | ( | ) | [static] |
Create and return a new TestInteraction.
Basically a wrapper around the constructor. It is necessary because pointers to static functions like this can be registered with a DtInteractionFactory, but constructors can not. Required.
| virtual DtInteractionDecoder* TestInteraction::createDecoder | ( | DtExerciseConn * | exConn | ) | const [protected, virtual] |
Virtual function override.
Creates and returns a decoder to be used by setFromPhvps to decode a ParameterHandleValuePairSet into this interaction. Implementing this function is required, unless you would like to rely on the default behavior - which is to obtain a new instance of the right decoder from the FOM Mapper. If you choose this option, you must configure the FOM Mapper so that it can correctly provide this object.
Reimplemented from DtInteractionWithEncDec.
| virtual DtInteractionEncoder* TestInteraction::createEncoder | ( | DtExerciseConn * | exConn | ) | const [protected, virtual] |
Virtual function override.
Creates and returns an encoder to be used by phvps to encode the data in this interaction into a ParameterHandleValuePairSet. Implementing this function is required, unless you would like to rely on the default behavior - which is to obtain a new instance of the right encoder from the FOM Mapper. If you choose this option, you must configure the FOM Mapper so that it can correctly provide this object.
Reimplemented from DtInteractionWithEncDec.
| virtual char* TestInteraction::interactionClassToUse | ( | DtExerciseConn * | exConn | ) | const [protected, virtual] |
Virtual function override.
Returns the name of the FOM class to use to represent this interaction when sending. It is called from within setExConn, when that function is called by DtExerciseConn::send. Implementing this function is required unless you would like to rely on the default behavior - which is to obtain the class to use from the FOM Mapper. If you choose this option, you must configure the FomMapper so that it can correctly provide this information.
Reimplemented from DtInteraction.
| virtual const char* TestInteraction::name | ( | ) | const [virtual] |
Virtual function override.
Should return the name of this C++ class, which is not necessarily the Interaction Class name from the FOM. Required.
Implements DtInteraction.
| virtual int TestInteraction::number | ( | ) | const [virtual] |
| TestInteraction& TestInteraction::operator= | ( | const TestInteraction & | orig | ) |
Assignment operator.
Not required by VR-Link, but needed if you will ever want to copy TestInteractions.
| virtual void TestInteraction::printData | ( | ) | const [virtual] |
Virtual function override.
Prints the data values in the interaction. Not strictly required, but encouraged, since otherwise calling print() on an instance of this class with merely print raw hex data.
Reimplemented from DtInteraction.
| static void TestInteraction::removeCallback | ( | DtExerciseConn * | conn, |
| TestInteractionCb | cb, | ||
| void * | usr | ||
| ) | [static] |
| virtual void TestInteraction::setNumber | ( | int | num | ) | [virtual] |
Set/Get the parameter named "Number".
| virtual void TestInteraction::setVector | ( | const DtVector & | vec | ) | [virtual] |
Set/Get the parameter named "Vector".
| virtual const DtVector& TestInteraction::vector | ( | ) | const [virtual] |
int TestInteraction::myNum [protected] |
DtVector TestInteraction::myVec [protected] |