All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
SurgSim::Input::OutputProducer Class Reference

An output producer sends data to a device. More...

Inheritance diagram for SurgSim::Input::OutputProducer:
Inheritance graph
[legend]
Collaboration diagram for SurgSim::Input::OutputProducer:
Collaboration graph
[legend]

Public Member Functions

 OutputProducer ()
 Constructor. More...
 
virtual ~OutputProducer ()
 Destructor. More...
 
virtual bool requestOutput (const std::string &device, SurgSim::DataStructures::DataGroup *outputData) override
 Send the output to the device. More...
 
void setData (const SurgSim::DataStructures::DataGroup &dataGroup)
 Set the output data information stored in this output producer. More...
 
- Public Member Functions inherited from SurgSim::Input::OutputProducerInterface
virtual ~OutputProducerInterface ()
 Virtual destructor (empty). More...
 

Private Attributes

SurgSim::Framework::LockedContainer
< SurgSim::DataStructures::DataGroup
m_lastOutput
 Used to store output data information to be passed out to device. More...
 
bool m_haveData
 Has setData been called since construction? More...
 

Detailed Description

An output producer sends data to a device.

Constructor & Destructor Documentation

SurgSim::Input::OutputProducer::OutputProducer ( )
inline

Constructor.

virtual SurgSim::Input::OutputProducer::~OutputProducer ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual bool SurgSim::Input::OutputProducer::requestOutput ( const std::string &  device,
SurgSim::DataStructures::DataGroup outputData 
)
inlineoverridevirtual

Send the output to the device.

Parameters
deviceThe name of the device to receive the output.
[out]outputDataThe output data going to the device.
Returns
true if outputData was provided.

Implements SurgSim::Input::OutputProducerInterface.

void SurgSim::Input::OutputProducer::setData ( const SurgSim::DataStructures::DataGroup dataGroup)
inline

Set the output data information stored in this output producer.

Parameters
dataGroupData to be sent to the device

Member Data Documentation

bool SurgSim::Input::OutputProducer::m_haveData
private

Has setData been called since construction?

SurgSim::Framework::LockedContainer<SurgSim::DataStructures::DataGroup> SurgSim::Input::OutputProducer::m_lastOutput
private

Used to store output data information to be passed out to device.

The DataGroup in the LockedContainer is default-constructed, so m_lastOutput.get will assert until after the first call to m_lastOutput.set in setData.


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