Manager to handle InputComponent and OutputComponent, SceneElement can add these to get input from devices, or even write output to devices.
More...
#include <InputManager.h>
|
template<class T > |
std::shared_ptr< T > | tryAddComponent (std::shared_ptr< SurgSim::Framework::Component > component, std::vector< std::shared_ptr< T >> *container) |
| Template version of the addComponent method. More...
|
|
template<class T > |
bool | tryRemoveComponent (std::shared_ptr< SurgSim::Framework::Component > component, std::vector< std::shared_ptr< T >> *container) |
| Template version of the removeComponent method. More...
|
|
void | processComponents () |
| Processes all the components that are scheduled for addition or removal, this needs to be called inside the doUpdate() function. More...
|
|
void | processBehaviors (const double dt) |
| Processes behaviors This needs to be called inside doUpdate() function in each 'sub' manager. More...
|
|
void | copyScheduledComponents (std::vector< std::shared_ptr< Component >> *inflightAdditions, std::vector< std::shared_ptr< Component >> *inflightRemovals, std::vector< std::shared_ptr< SceneElement >> *inflightElements) |
| Helper, blocks access to the additions and removal queue and copies the components from there to the intermediate inflight queues, after this call, the incoming queues will be empty. More...
|
|
std::shared_ptr< SurgSim::Framework::Logger > | getLogger () const |
| Returns this manager's logger.
|
|
template<class T > |
void | retireComponents (const std::vector< std::shared_ptr< T >> &container) |
|
bool | initialize () |
| Trigger the initialization of this object, this will be called before all other threads doStartup() are called. More...
|
|
bool | startUp () |
| Trigger the startup of this object, this will be called after all other threads doInit() was called the thread will only enter the run loop triggering upated() if all threads doInit() and doStartup() returned true. More...
|
|
bool | waitForBarrier (bool success) |
|
boost::mutex | m_componentMutex |
| Blocks protects addition and removal queues.
|
|
std::vector< std::shared_ptr< SurgSim::Framework::Behavior > > | m_behaviors |
| Collection of behaviors.
|
|
std::vector< std::shared_ptr< Component > > | m_componentAdditions |
|
std::vector< std::shared_ptr< Component > > | m_componentRemovals |
|
std::vector< std::shared_ptr< SceneElement > > | m_elementCache |
|
Timer | m_timer |
| Timer to measure the actual time taken to doUpdate.
|
|
std::shared_ptr< SurgSim::Framework::Logger > | m_logger |
| Logger for this thread.
|
|
Manager to handle InputComponent and OutputComponent, SceneElement can add these to get input from devices, or even write output to devices.
The devices have to be added to this class before components can be added to it.
§ addDevice()
Adds a device to the manager.
- Parameters
-
- Returns
- true if it succeeds, false if the device already exists in the manager.
§ removeDevice()
Removes the device described by device.
- Parameters
-
- Returns
- true if it succeeds, false if the device is not in.
The documentation for this class was generated from the following files: