![]() |
VR-Vantage API Documentation
|
A Draw Control Object Manager. More...
Public Member Functions | |
| DtStealthRemoteDrawer (DtExerciseConn *exConn, const DtGlobalObjectDesignator &targetStealthId=SEND_TO_ALL, unsigned nextId=0) | |
| Construct a DtStealthRemoteDrawer for sending and receiving draw control using the given exercise connection. | |
| DtStealthRemoteDrawer (DtCustomRemoteControlSender *sender, const DtGlobalObjectDesignator &senderId, const DtGlobalObjectDesignator &targetStealthId=SEND_TO_ALL, unsigned nextId=0) | |
| Construct a DtStealthRemoteDrawer that can send draw control msgs using a custom message sender. | |
| DtStealthRemoteDrawer (const char *execName, const char *federateType, DtFomMapper *mapper=DtRprFomMapper::create(NULL), const char *fedFileName=NULL, const DtGlobalObjectDesignator &targetStealthId=SEND_TO_ALL, unsigned nextId=0) | |
| Construct a DtStealthRemoteDrawer that also constructs its own exercise connection for HLA. | |
| DtStealthRemoteDrawer (const char *execName, const char *federateType, const char *dsoName, const char *fedFileName=NULL, void *fomMapInitData=NULL, const DtGlobalObjectDesignator &targetStealthId=SEND_TO_ALL, unsigned nextId=0) | |
| Construct a DtStealthRemoteDrawer that also constructs its own exercise connection for HLA. | |
| virtual | ~DtStealthRemoteDrawer () |
| Destructor. | |
| virtual unsigned | nextId () |
| Unique Id Generator. | |
| virtual void | add (DtSdcObject *object) |
| Add a draw control object to the controlled stealth(s) | |
| virtual void | addToLayer (unsigned id, unsigned layerId) |
| Add a draw control object to a layer. | |
| virtual DtSdcObject * | remove (unsigned id) |
| Remove a draw control object from the controlled stealth(s) | |
| virtual void | removeFromLayer (unsigned id, unsigned layerId) |
| Add a draw control object to a layer. | |
| virtual DtSdcObject * | lookup (unsigned id) |
| Get a pointer to a draw control object. | |
| virtual void | update (unsigned id) |
| Update a draw control object. | |
| virtual void | show (unsigned id) |
| Show a (previously hidden) draw control object. | |
| virtual void | showAttribute (unsigned groupId, unsigned attributeId) |
| Show a (previously hidden) attribute. | |
| virtual void | hide (unsigned id) |
| Hide a draw control object. | |
| virtual void | hideAttribute (unsigned groupId, unsigned attributeId) |
| Hide an attribute. | |
Static Public Attributes | |
| static const DtGlobalObjectDesignator | SEND_TO_ALL = "0:0:0" |
| A wild-card send-to ID. | |
Protected Member Functions | |
| virtual void | update (DtSdcObject *object) |
Protected Attributes | |
| DtExerciseConn * | myExConn |
| DtCustomRemoteControlSender * | myCustomSender |
| unsigned | myNextId |
| DtSdcObjectList | myObjectList |
| bool | myCreatedExConn |
| DtGlobalObjectDesignator | myTargetId |
| DtGlobalObjectDesignator | mySenderId |
| DtStealthControlInteraction | mySendInter |
Private Member Functions | |
| DtStealthRemoteDrawer () | |
| Default Constructor. | |
| DtStealthRemoteDrawer (const DtStealthRemoteDrawer &) | |
| Copy Constructor. | |
| DtStealthRemoteDrawer & | operator= (const DtStealthRemoteDrawer &) |
| Assignment Operator. | |
A Draw Control Object Manager.
DtStealthRemoteDrawer can provide unique ids for and store draw control objects for later retrieval. More importantly, it can send those objects through an exercise connection provided to it or create its own to a specific stealth or all stealths in an exercise / federation. It can also manage draw control layers, and send commands to show and hide individual draw control objects or entire layers. It can also send messages to show or hide attributes within a group or attribute templates (showing or hiding attributes in all groups using that template.
| DtStealthRemoteDrawer::DtStealthRemoteDrawer | ( | DtExerciseConn * | exConn, |
| const DtGlobalObjectDesignator & | targetStealthId = SEND_TO_ALL, |
||
| unsigned | nextId = 0 |
||
| ) |
Construct a DtStealthRemoteDrawer for sending and receiving draw control using the given exercise connection.
| exConn | DtExerciseConn to use for sending draw control messages |
| targetStealthId | The stealth that should respond to these messages. By default, SEND_TO_ALL is used |
| nextId | The starting value to use when generating ids. It's therefore possible for a single application to have multiple drawers if there is an architectural need to do so |
References myExConn, and mySenderId.
| DtStealthRemoteDrawer::DtStealthRemoteDrawer | ( | DtCustomRemoteControlSender * | sender, |
| const DtGlobalObjectDesignator & | senderId, | ||
| const DtGlobalObjectDesignator & | targetStealthId = SEND_TO_ALL, |
||
| unsigned | nextId = 0 |
||
| ) |
Construct a DtStealthRemoteDrawer that can send draw control msgs using a custom message sender.
Use this creator if you would like to send draw control msgs without a VR-Link license.
| sender | Custom sender object for sending draw control messages |
| senderId | When the VR-Link exercise connection is used, it's own site/host pair or federate type can be used as the senderId. When a custom sender is employed, the user must provide a unique senderId. |
| targetStealthId | The stealth that should respond to these messages. By default, SEND_TO_ALL is used |
| nextId | The starting value to use when generating ids. It's therefore possible for a single application to have multiple drawers if there is an architectural need to do so |
| DtStealthRemoteDrawer::DtStealthRemoteDrawer | ( | const char * | execName, |
| const char * | federateType, | ||
| DtFomMapper * | mapper = DtRprFomMapper::create(NULL), |
||
| const char * | fedFileName = NULL, |
||
| const DtGlobalObjectDesignator & | targetStealthId = SEND_TO_ALL, |
||
| unsigned | nextId = 0 |
||
| ) |
Construct a DtStealthRemoteDrawer that also constructs its own exercise connection for HLA.
| execName | The name of the federation execution to join |
| federateType | This federate's type |
| mapper | Mapper is a pointer to a new'ed FOM Mapper to use. The FOM Mapper's init() function will be called by the DtExerciseConn constructor. The default value for mapper is a new'ed DtRprFomMapper. The mapper is deleted by DtExerciseConn destructor. If mapper is NULL, we create one using the creator function passed to setFomMapperCreator (default is an empty FOM Mapper). The FOM Mapper's init function is called after the RTI is initialized. |
| fedFileName | Name of the Fed file to use. If fedFileName is NULL, <execName>.fed is used. |
| targetStealthId | The stealth that should respond to these messages. By default, SEND_TO_ALL is used |
| nextId | The starting value to use when generating ids. It's therefore possible for a single application to have multiple drawers if there is an architectural need to do so |
References myExConn, and mySenderId.
| DtStealthRemoteDrawer::DtStealthRemoteDrawer | ( | const char * | execName, |
| const char * | federateType, | ||
| const char * | dsoName, | ||
| const char * | fedFileName = NULL, |
||
| void * | fomMapInitData = NULL, |
||
| const DtGlobalObjectDesignator & | targetStealthId = SEND_TO_ALL, |
||
| unsigned | nextId = 0 |
||
| ) |
Construct a DtStealthRemoteDrawer that also constructs its own exercise connection for HLA.
| execName | The name of the federation execution to join |
| federateType | This federate's type |
| dsoName | The name of a shared library (DSO or DLL) that contains a FOM Mapper creation function called DtCreateFomMapper (and a FOM Mapper destruction function called DtDeleteFomMapper). |
| fedFileName | Name of the Fed file to use. If fedFileName is NULL, <execName>.fed is used. |
| fomMapInitData | a pointer to arbitrary data that you wish to have passed to the FOM Mapper creation function in your FOM Mapper shared library. |
| targetStealthId | The stealth that should respond to these messages. By default, SEND_TO_ALL is used |
| nextId | The starting value to use when generating ids. It's therefore possible for a single application to have multiple drawers if there is an architectural need to do so |
References myExConn, and mySenderId.
|
private |
Default Constructor.
Not implemented; a method for sending and a send-to ID must be provided to construct a DtStealthRemoteDrawer
|
private |
Copy Constructor.
Not implemented; copying a DtStealthRemoteDrawer is not supported
|
virtual |
Destructor.
Note Well! The destructor for the DtStealthRemoteDrawer deletes all objects added to it. However it does NOT send remove messages for each (so this should be done before deleting the DtStealthRemoteDrawer).
References myCreatedExConn, myExConn, and myObjectList.
|
private |
Assignment Operator.
Not implemented; assigning a DtStealthRemoteDrawer to another is not supported
|
virtual |
|
virtual |
Add a draw control object to the controlled stealth(s)
Add an object that should be managed by the drawer. The object added is automatically sent to the network. Note that while Attribute Templates are DtSdcObjects, they should not be added directly; they are managed as part of the Attribute Group Template object used to create them, so only that object needs to be added. NOTE WELL - adding an object to the drawer cedes control over the object's memory to the drawer. If the drawer is deleted before explicitly removing the object from the drawer, the drawer's destructor will delete that object. That also means that objects given to the drawer should be allocated using 'new', not created on the stack. \ param object The object to add
References myObjectList, and update().
|
virtual |
Add a draw control object to a layer.
Put a draw control object onto a draw layer. Draw control objects that are associated with a layer are shown and hidden when a layer is shown or hidden. This makes it easier to manage sets of objects that should be shown or hidden as a group.
| id | The draw control object id of the object to add to the layer |
| id | The draw control object id of the layer to add the object to |
|
virtual |
Remove a draw control object from the controlled stealth(s)
Remove a draw control object from stealth(s) drawing it, and also remove it from the drawer's control.
| id | The draw control object id of the object to remove |
References myObjectList.
|
virtual |
Add a draw control object to a layer.
Put a draw control object onto a draw layer. Draw control objects that are associated with a layer are shown and hidden when a layer is shown or hidden. This makes it easier to manage sets of objects that should be shown or hidden as a group.
| id | The draw control object id of the object to add to the layer |
| id | The draw control object id of the layer to add the object to |
|
virtual |
Get a pointer to a draw control object.
This function returns a pointer to an object previously added using the add() method.
| id | id of the draw control object to return |
References myObjectList.
|
virtual |
Update a draw control object.
Once a draw control object has been added to the drawer, it can be modified using any of its mutators to change its appearance, position, attribute values, etc. After making changes, call update to send those changes to the stealth(s) drawing the draw control object
| draw | control object id of the object to update |
References lookup().
|
virtual |
|
virtual |
Show a (previously hidden) attribute.
Attributes may be shown for a specific group or for all groups using a specific attribute template. If the first parameter specified is the id of an attribute group, then the attribute referred to by attributeId will be shown. If the first parameter is the id of an attribute group template, then the attributes corresponding to the attributeId specified will be shown in all groups based on that template
| groupId | id of an attribute group or attribute group template |
| attributeId | Id of the attribute template describing the attribute to show |
|
virtual |
|
virtual |
Hide an attribute.
Attributes may be hidden for a specific group or for all groups using a specific attribute template. If the first parameter specified is the id of an attribute group, then the attribute referred to by attributeId will be hidden. If the first parameter is the id of an attribute group template, then the attributes corresponding to the attributeId specified will be hidden in all groups based on that template.
| groupId | id of an attribute group or attribute group template |
| attributeId | Id of the attribute template describing the attribute to hide |
|
protectedvirtual |
|
static |
A wild-card send-to ID.
|
protected |
Referenced by DtStealthRemoteDrawer(), and ~DtStealthRemoteDrawer().
|
protected |
|
protected |
Referenced by nextId().
|
protected |
Referenced by add(), lookup(), remove(), and ~DtStealthRemoteDrawer().
|
protected |
Referenced by ~DtStealthRemoteDrawer().
|
protected |
|
protected |
Referenced by DtStealthRemoteDrawer().
|
protected |