19 #include <vlutil/vlRunnable.h>
21 #include <boost/function.hpp>
23 #include <vlutil/vlThread.h>
29 class DtAsynchronousAgentManager;
30 class DtAsynchronousEventQueue;
49 virtual const std::string&
className()
const;
DtThreadStartSP myStart
Definition: DtExampleThreadedDriver.h:137
boost::signalslib::signal< void(DtExampleSimulationConnection *)> signal_simulationCreated
This signal is emitted when the simulation connection is created.
Definition: DtExampleThreadedDriver.h:66
An asynchronous interface to the scene manager.
Definition: DtAsynchronousAgentManager.h:24
virtual void attachObserverToEntity(const std::string &entityName)
Tells the current observer to attach to the named entity.
virtual bool onStart()
Performs startup logic for the driver.
DtExampleSimulationConnection * mySimulationConnection
Definition: DtExampleThreadedDriver.h:144
A Record of an IG instance.
Definition: DtDeRecord.h:24
void stopThread()
Attempt to stop the thread, blocking until the thread stops.
Contains makVrv:DtSelectionManager class.
DtThread * myThread
Definition: DtExampleThreadedDriver.h:138
virtual ~DtExampleThreadedDriver()
Virtual DTOR.
boost::signalslib::signal< void(DtExampleSimulationConnection *)> signal_simulationAboutToBeDestroyed
This signal is emitted when the simulation connection is about to be destroyed.
Definition: DtExampleThreadedDriver.h:69
bool useThreadFlag() const
See if this driver is running connection methods in a separate thread.
Contains makVrv::DtLockedBufferedQueue class.
virtual void queueConnectionFunction(const boost::function< void()> &function)
Put a function in the sim function queue, for threadsafe calling.
virtual void queueDriverFunction(const boost::function< void()> &function)
Put a function in the sim function queue, for threadsafe calling.
void startThread()
Attempt to start the thread.
makVrv::DtAsynchronousEventQueue * myAsynchronousEventQueue
Definition: DtExampleThreadedDriver.h:145
virtual const std::string & className() const
Get this instance's class name.
Definition: DtExampleThreadedDriver.h:39
virtual void run()
Function that will be called when the thread is started.
A locked buffered queue which allows multiple writers and a single reader.
Definition: DtLockedBufferedQueue.h:24
bool mySimulationConnectionState
Definition: DtExampleThreadedDriver.h:146
The DtDriver is an abstract class.
Definition: DtDriver.h:31
std::vector< boost::function< void()> > FunctionCallList
Definition: DtExampleThreadedDriver.h:124
virtual bool onTick()
Performs update logic for the driver.
DtExampleThreadedDriver(makVrv::DtAgentManager &am)
CTOR.
FunctionCallQueue myDriverThreadFunctions
Definition: DtExampleThreadedDriver.h:140
The asynchronous event queue.
Definition: DtAsynchronousEventQueue.h:24
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
virtual void connectToDynamicSignals()
Connect to signals.
virtual void runFunctionQueue(FunctionCallQueue &queue)
Execute a function queue.
virtual void disconnectFromDynamicSignals()
Disconnect to any signals connected to in connectToDynamicSignals()
DtExampleSimulationConnection * simulationConnection()
Get the simulation connection.
The DtAgentManager manages the distributed scene object framework.
Definition: DtAgentManager.h:38
Contains makVrv:DtDriver class.
virtual void slot_togglePinnedLabel(const makVrv::DtSelectionManager::IdSet &sel)
Listens for entity labels being pinned / unpinned.
void setSimulationConnectionState(bool state)
Set the connection state of the driver.
std::string myClassName
Definition: DtExampleThreadedDriver.h:131
Base class to provide boost signal/slot management.
DtExampleSimulationConnection.
Definition: DtExampleSimulationConnection.h:35
virtual DtExampleSimulationConnection * createSimulationConnection()
Abstract create simulation function called onStart.
makVrv::DtSignalConnectionManager myDynamicSignals
Definition: DtExampleThreadedDriver.h:148
FunctionCallQueue myConnectionThreadFunctions
Definition: DtExampleThreadedDriver.h:139
makVrv::DtLockedBufferedQueue< boost::function< void()> > FunctionCallQueue
Definition: DtExampleThreadedDriver.h:123
makVrv::DtAsynchronousAgentManager * myAsynchronousInterface
Definition: DtExampleThreadedDriver.h:141
bool myUseThreadFlag
Cross thread variables.
Definition: DtExampleThreadedDriver.h:136
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
virtual void slot_displayEngineAdded(const makVrv::DtDeRecord &igRecord)
Ensures the driver is properly restarted when a de is connected.
virtual bool onStop()
Performs shutdown logic for the driver.