An OutputFrameSeries encapsulated into a SimModule. More...
#include <Media/SimFrameSeries.H>
Public Member Functions | |
SimOutputFrameSeries (OptionManager &mgr, const std::string &descrName="Sim Output Frame Series", const std::string &tagName="SimOutputFrameSeries") | |
Constructor. | |
virtual | ~SimOutputFrameSeries () |
Destructor. | |
virtual bool | isVoid () const |
Check if we have no output destinations (e.g., user gave --out=none). | |
void | addFrameDest (const std::string &dest) |
Add a frame destination; same as doing --out=source on the command line. | |
int | frame () const |
Get the current frame number. | |
Protected Member Functions | |
SIMCALLBACK_DECLARE (SimOutputFrameSeries, SimEventClockTick) | |
Callback function at triggered at each clock tick. | |
SIMCALLBACK_DECLARE (SimOutputFrameSeries, SimEventRequestSaveOutput) | |
Callback function to check for requests to save outputs. | |
void | update (SimEventQueue &q, const bool saveRequested) |
update | |
Protected Attributes | |
OModelParam< SimTime > | itsTimeStep |
Simulation time step. |
An OutputFrameSeries encapsulated into a SimModule.
SimOutputFrameSeries encapsulates the functionality of OutputFrameSeries for use by SimModule objects. The interface is a simplified version of that of OutputFrameSeries, since now most of the I/O is handled through the SimEventQueue blackboard rather than through explicit function calls and return values. Rather than deriving from OutputFrameSeries, we hold an OutputFrameSeries as a data member. This is because much of the OutputFrameSeries interface is not used here because it is replaced by posting messages to the SimEventQueue.
Definition at line 109 of file SimFrameSeries.H.
SimOutputFrameSeries::SimOutputFrameSeries | ( | OptionManager & | mgr, | |
const std::string & | descrName = "Sim Output Frame Series" , |
|||
const std::string & | tagName = "SimOutputFrameSeries" | |||
) |
Constructor.
Definition at line 141 of file SimFrameSeries.C.
References ModelComponent::addSubComponent().
SimOutputFrameSeries::~SimOutputFrameSeries | ( | ) | [virtual] |
Destructor.
Definition at line 155 of file SimFrameSeries.C.
void SimOutputFrameSeries::addFrameDest | ( | const std::string & | dest | ) |
Add a frame destination; same as doing --out=source on the command line.
Definition at line 238 of file SimFrameSeries.C.
int SimOutputFrameSeries::frame | ( | ) | const |
Get the current frame number.
Definition at line 242 of file SimFrameSeries.C.
bool SimOutputFrameSeries::isVoid | ( | ) | const [virtual] |
Check if we have no output destinations (e.g., user gave --out=none).
Clients can test isVoid() before they generate potentially expensive output images. This is just a performance optimization -- even if isVoid() is true, it's still safe to call writeRGB(), writeGray(), etc., but those calls will do nothing, and so any time spent computing the image will have been wasted.
Definition at line 234 of file SimFrameSeries.C.
SimOutputFrameSeries::SIMCALLBACK_DECLARE | ( | SimOutputFrameSeries | , | |
SimEventRequestSaveOutput | ||||
) | [protected] |
Callback function to check for requests to save outputs.
SimOutputFrameSeries::SIMCALLBACK_DECLARE | ( | SimOutputFrameSeries | , | |
SimEventClockTick | ||||
) | [protected] |
Callback function at triggered at each clock tick.
void SimOutputFrameSeries::update | ( | SimEventQueue & | q, | |
const bool | saveRequested | |||
) | [protected] |
update
Definition at line 173 of file SimFrameSeries.C.
References rutz::shared_ptr< T >::is_valid(), Point2D< T >::isValid(), SimEventQueue::now(), and SimEventQueue::post().
OModelParam<SimTime> SimOutputFrameSeries::itsTimeStep [protected] |
Simulation time step.
Definition at line 145 of file SimFrameSeries.H.