VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
makVrv::DtDriver Class Reference

The DtDriver is an abstract class. More...

Inheritance diagram for makVrv::DtDriver:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtDriver (DtAgentManager &agentManager, const std::string &instanceName)
 CTOR.
virtual ~DtDriver ()
 DTOR.
virtual void realizeConfiguration (const DtConfiguration &configuration)
 Realize the driver using the configuration.
virtual DtConfiguration createConfiguration () const
 Create a configuration for the driver.
DtAgentManageragentManager ()
 Get the master scene for this host.
virtual DtAgentManagerInterfacesceneInterface ()
 Get the scene manager interface for creating agents.
bool started () const
 Get this driver's active state.
virtual const std::string & className () const =0
 Get this driver's class name.
virtual const std::string & instanceName () const
 Get this driver's instance name.
virtual bool autoStart () const
 Get whether this driver is set to automatically start if it is persistent.
virtual void setAutoStart (bool autoStart)
 Set whether this driver automatically starts if it is persistent.
virtual bool isWindowDependent () const
 Get whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed.
virtual void setIsWindowDependent (bool dep)
 Set whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed.
virtual void setIsUserControllable (bool)
 Set whether this driver can be started and stopped by the user.
virtual bool isUserControllable () const
 Get whether this driver can be started and stopped by the user.
virtual void setIsPersistent (bool per)
 Set if the driver is persistent and should be saved between runs.
virtual bool isPersistent () const
 Get if the driver is persistent and should be saved between runs.
virtual bool isOnDriverSelectionList () const
 Returns whether or not this driver is to be automatically started/stopped from the driver selection list.
virtual void setOnDriverSelectionList (bool)
 Sets whether or not this item is on the driver selection list.
bool objectFromAgentManager (const DtUniqueID &id) const
 check to see if the object was created using this driver's agent manager.

Protected Member Functions

void applyChangesAndDelete (DtElementChanges *changes)
 Function for apply changes from a changes object and deleting it.
void reportElementCreated (DtElementID id, DtElementID parentId, DtElementEntry::ElementType type)
 Report an element created.
void reportElementAttribute (DtElementID id, DtElementAttribute *attribute)
 Report an element attribute changed.
void reportElementDestroyed (DtElementID id)
 Report an element destroyed.
void start ()
 Start the driver.
void stop ()
 Stop the driver.
bool tick ()
 Tick the host driver.
virtual bool onStart ()=0
 Start the host output.
virtual bool onStop ()=0
 Stop the host output.
virtual bool onTick ()=0
 Tick.
virtual void slot_displayEngineAdded (const DtDeRecord &igRecord)
 Called when a display engine is added.
virtual void setInstanceName (const std::string &name)
 set the Instance name.
virtual void installAccessories ()
 Installs accessories on this driver.
virtual void uninstallAccessories ()
 Removes accessories from this driver.

Protected Attributes

DtAgentManagermyAgentManager
bool myStartedFlag
std::string myName
DtConfiguration myConfiguration
bool myPersistentFlag
bool myUserControllableFlag
bool myRequestStateDiffPendingFlag
DtElementChanges myChanges

Friends

class DtDriverManager

Detailed Description

The DtDriver is an abstract class.

Developers derive from this to create logic that "directs" things in the VRV framework.

Examples

Constructor & Destructor Documentation

makVrv::DtDriver::DtDriver ( DtAgentManager agentManager,
const std::string &  instanceName 
)

CTOR.

virtual makVrv::DtDriver::~DtDriver ( ) [virtual]

DTOR.


Member Function Documentation

virtual void makVrv::DtDriver::realizeConfiguration ( const DtConfiguration configuration) [virtual]

Realize the driver using the configuration.

Reimplemented in makVrv::DtCigiDriver, makVrv::DtDisDriver, makVrv::DtHla13Driver, makVrv::DtHla1516Driver, and makVrv::DtHla1516eDriver.

Get the master scene for this host.

Do not create drivers using this agentManager, use the sceneInterface as it may replaced the implementation of the sceneInterface.

Get the scene manager interface for creating agents.

Reimplemented in makVrv::DtCigiDriver.

bool makVrv::DtDriver::started ( ) const [inline]

Get this driver's active state.

virtual const std::string& makVrv::DtDriver::className ( ) const [pure virtual]
virtual const std::string& makVrv::DtDriver::instanceName ( ) const [virtual]

Get this driver's instance name.

virtual bool makVrv::DtDriver::autoStart ( ) const [virtual]

Get whether this driver is set to automatically start if it is persistent.

Reimplemented in makVrv::DtIntervisibilityDriver.

virtual void makVrv::DtDriver::setAutoStart ( bool  autoStart) [virtual]

Set whether this driver automatically starts if it is persistent.

virtual bool makVrv::DtDriver::isWindowDependent ( ) const [virtual]

Get whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed.

virtual void makVrv::DtDriver::setIsWindowDependent ( bool  dep) [virtual]

Set whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed.

virtual void makVrv::DtDriver::setIsUserControllable ( bool  ) [virtual]

Set whether this driver can be started and stopped by the user.

virtual bool makVrv::DtDriver::isUserControllable ( ) const [virtual]

Get whether this driver can be started and stopped by the user.

Reimplemented in makVrv::DtUnknownDriver.

virtual void makVrv::DtDriver::setIsPersistent ( bool  per) [virtual]

Set if the driver is persistent and should be saved between runs.

virtual bool makVrv::DtDriver::isPersistent ( ) const [virtual]

Get if the driver is persistent and should be saved between runs.

virtual bool makVrv::DtDriver::isOnDriverSelectionList ( ) const [virtual]

Returns whether or not this driver is to be automatically started/stopped from the driver selection list.

virtual void makVrv::DtDriver::setOnDriverSelectionList ( bool  ) [virtual]

Sets whether or not this item is on the driver selection list.

Will be saved to record if state is different

check to see if the object was created using this driver's agent manager.

Function for apply changes from a changes object and deleting it.

This function is useful for queuing from an external thread as a means of passing changes from a secondary thread back to the main thread.

Report an element created.

void makVrv::DtDriver::reportElementAttribute ( DtElementID  id,
DtElementAttribute attribute 
) [protected]

Report an element attribute changed.

Note:
The attribute passed in should not be used again.

Report an element destroyed.

void makVrv::DtDriver::start ( ) [protected]

Start the driver.

Called by the Master Scene. Calls installAccessories().

void makVrv::DtDriver::stop ( ) [protected]

Stop the driver.

Called by the Master Scene. Calls uninstallAccessories().

bool makVrv::DtDriver::tick ( ) [protected]

Tick the host driver.

Called by the Master Scene.

Return values:
trueif tick succeeded.
falseif the host must be stopped.
virtual bool makVrv::DtDriver::onStart ( ) [protected, pure virtual]

Start the host output.

Create all objects for an existing host connection.

Return values:
trueif start succeeded
falseotherwise.

Implemented in makVrv::DtIntervisibilityDriver, makVrv::DtCigiDriver, makVrv::DtVrlinkDriver, makVrv::DtInputDriver, makVrv::exampleSymbolFacade3::DtExampleSymbolDriver, makVrv::exampleSymbolFacade5::DtExampleSymbolDriver, makVrv::exampleSymbolFacade4::DtExampleSymbolDriver, makVrv::exampleSymbolFacade2::DtExampleSymbolDriver, makVrv::exampleSymbolFacade1::DtExampleSymbolDriver, DtStateViewDriver, makVrv::DtSceneDriver, makVrv::DtGlStudioDriver, DtExampleDriver, DtBhaveDebugLineDriver, DtDistributedDrawDriver, DtExampleTrackHistoryDriver, makVrv::tutorialDistributedSimulation5::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation2B::DistributedSimulationDriver, makVrf::DtBhaveDebugLineDriver, DtExampleCommLinesDriver, makVrv::vrvExampleCloudDriver::DtCloudDriver, makVrv::DtUnknownDriver, makVrv::tutorialDistributedSimulation3B::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation3D::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation4B::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation3A::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation4C::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation3C::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation4A::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation1::DistributedSimulationDriver, and makVrv::tutorialDistributedSimulation2A::DistributedSimulationDriver.

virtual bool makVrv::DtDriver::onStop ( ) [protected, pure virtual]

Stop the host output.

All scene object created by the host should be destroyed.

Return values:
trueif stop succeeded.
falseotherwise.

Implemented in makVrv::DtIntervisibilityDriver, makVrv::DtCigiDriver, makVrv::DtVrlinkDriver, makVrv::DtInputDriver, makVrv::exampleSymbolFacade3::DtExampleSymbolDriver, makVrv::exampleSymbolFacade5::DtExampleSymbolDriver, makVrv::exampleSymbolFacade4::DtExampleSymbolDriver, makVrv::exampleSymbolFacade2::DtExampleSymbolDriver, makVrv::exampleSymbolFacade1::DtExampleSymbolDriver, DtBhaveDebugLineDriver, makVrv::DtGlStudioDriver, DtExampleDriver, DtStateViewDriver, makVrv::DtSceneDriver, makVrf::DtBhaveDebugLineDriver, DtDistributedDrawDriver, DtExampleTrackHistoryDriver, makVrv::tutorialDistributedSimulation5::DistributedSimulationDriver, DtExampleCommLinesDriver, makVrv::tutorialDistributedSimulation2B::DistributedSimulationDriver, makVrv::DtUnknownDriver, makVrv::vrvExampleCloudDriver::DtCloudDriver, makVrv::tutorialDistributedSimulation3B::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation3D::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation4B::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation3A::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation4C::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation3C::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation4A::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation1::DistributedSimulationDriver, and makVrv::tutorialDistributedSimulation2A::DistributedSimulationDriver.

virtual bool makVrv::DtDriver::onTick ( ) [protected, pure virtual]

Tick.

Return values:
trueif tick succeeded.
falseotherwise.

Implemented in makVrv::DtIntervisibilityDriver, makVrv::DtCigiDriver, makVrv::DtVrlinkDriver, makVrv::DtInputDriver, makVrv::exampleSymbolFacade3::DtExampleSymbolDriver, makVrv::exampleSymbolFacade5::DtExampleSymbolDriver, makVrv::exampleSymbolFacade4::DtExampleSymbolDriver, makVrv::exampleSymbolFacade2::DtExampleSymbolDriver, makVrv::exampleSymbolFacade1::DtExampleSymbolDriver, DtStateViewDriver, DtDistributedDrawDriver, DtExampleDriver, makVrv::DtGlStudioDriver, makVrv::DtSceneDriver, DtExampleTrackHistoryDriver, makVrv::tutorialDistributedSimulation5::DistributedSimulationDriver, DtExampleCommLinesDriver, DtBhaveDebugLineDriver, makVrv::tutorialDistributedSimulation2B::DistributedSimulationDriver, makVrv::vrvExampleCloudDriver::DtCloudDriver, makVrv::DtUnknownDriver, makVrv::tutorialDistributedSimulation3B::DistributedSimulationDriver, makVrf::DtBhaveDebugLineDriver, makVrv::tutorialDistributedSimulation3D::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation4B::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation3A::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation4C::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation3C::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation4A::DistributedSimulationDriver, makVrv::tutorialDistributedSimulation1::DistributedSimulationDriver, and makVrv::tutorialDistributedSimulation2A::DistributedSimulationDriver.

virtual void makVrv::DtDriver::slot_displayEngineAdded ( const DtDeRecord igRecord) [protected, virtual]
virtual void makVrv::DtDriver::setInstanceName ( const std::string &  name) [protected, virtual]

set the Instance name.

Note:
Only called by the sim driver manager. Renaming is treated as destroying and adding the same driver with a different name.
virtual void makVrv::DtDriver::installAccessories ( ) [protected, virtual]

Installs accessories on this driver.

The compatible and enabled accessories in the DtDriverManager's accessory map are installed on this driver.

virtual void makVrv::DtDriver::uninstallAccessories ( ) [protected, virtual]

Removes accessories from this driver.

The compatible and enabled accessories in the DtDriverManager's accessory map are removed from this driver.


Friends And Related Function Documentation

friend class DtDriverManager [friend]

Member Data Documentation

std::string makVrv::DtDriver::myName [protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)