Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PlotOptionEngine Class Reference

#include <plotoptionengine.h>

Collaboration diagram for PlotOptionEngine:

Public Member Functions

 PlotOptionEngine (const PlotOption &plotOption)
 
 PlotOptionEngine (const std::list< PlotOption > &plotOptions)
 
virtual ~PlotOptionEngine ()
 
virtual bool init (AbstractController *maybe_controller=0)
 initializes PlotOptionEngine and opens all pipes and stuff. More...
 
virtual bool reInit ()
 Reinitialises the PlotOptionEngine. More...
 
virtual void closePipes ()
 Closes all open pipes of the current used PlotOptions. More...
 
virtual void setName (const std::string &name)
 sets the name of all plotoptions (call before init, but after options are added) More...
 
virtual PlotOptionaddPlotOption (const PlotOption &plotoption)
 adds the PlotOptions to the list of plotoptions If a plotoption with the same Mode exists, then the old one is deleted first More...
 
virtual bool addAndInitPlotOption (const PlotOption &plotoption, bool forceInit=false)
 Adds the PlotOptions to the list of plotoptions If a plotoption with the same Mode exists, then the old one is deleted first The plotting is also initialized but only if the PlotOptionEngine is already intialized, This can be forced by additional param. More...
 
virtual bool removePlotOption (PlotMode mode)
 removes the PlotOptions with the given type More...
 
virtual void addInspectable (const Inspectable *inspectable, bool front=false)
 adds an inspectable object for logging. More...
 
virtual void addConfigurable (const Configurable *c)
 adds an configureable object for logging. More...
 
virtual void writePlotComment (const char *cmt, bool addSpace=true)
 write comment to output streams (PlotOptions). More...
 
virtual void plot (double time)
 

Protected Member Functions

bool initPlotOption (PlotOption &po)
 

Protected Attributes

std::list< PlotOptionplotOptions
 
std::list< const Inspectable * > inspectables
 
std::list< const Configurable * > configureables
 
long int t
 
bool initialised
 
AbstractControllermaybe_controller
 
std::string name
 

Constructor & Destructor Documentation

PlotOptionEngine ( const PlotOption plotOption)
PlotOptionEngine ( const std::list< PlotOption > &  plotOptions)
~PlotOptionEngine ( )
virtual

Member Function Documentation

bool addAndInitPlotOption ( const PlotOption plotoption,
bool  forceInit = false 
)
virtual

Adds the PlotOptions to the list of plotoptions If a plotoption with the same Mode exists, then the old one is deleted first The plotting is also initialized but only if the PlotOptionEngine is already intialized, This can be forced by additional param.

Parameters
plotoptionThe PlotOption to add
forceInitforce initialization of PlotOption even if PlotOptionEngine is not initalized. This may cause problems. Use this at your own risk.
Returns
void addConfigurable ( const Configurable c)
virtual

adds an configureable object for logging.

Must be called before init!

void addInspectable ( const Inspectable inspectable,
bool  front = false 
)
virtual

adds an inspectable object for logging.

Must be called before init!

PlotOption & addPlotOption ( const PlotOption plotoption)
virtual

adds the PlotOptions to the list of plotoptions If a plotoption with the same Mode exists, then the old one is deleted first

void closePipes ( )
virtual

Closes all open pipes of the current used PlotOptions.

bool init ( AbstractController maybe_controller = 0)
virtual

initializes PlotOptionEngine and opens all pipes and stuff.

The optional controller is used to print structure information

bool initPlotOption ( PlotOption po)
protected
void plot ( double  time)
virtual
bool reInit ( )
virtual

Reinitialises the PlotOptionEngine.

This means it closes all open pipes by calling closePipes() and restarts them by calling init().

Returns
true if succeeded, otherwise false.
bool removePlotOption ( PlotMode  mode)
virtual

removes the PlotOptions with the given type

Returns
true if sucessful, false otherwise
void setName ( const std::string &  name)
virtual

sets the name of all plotoptions (call before init, but after options are added)

void writePlotComment ( const char *  cmt,
bool  addSpace = true 
)
virtual

write comment to output streams (PlotOptions).

For instance changes in parameters. If addSpace then "# CMT" is output otherwise "#CMT".

Member Data Documentation

std::list< const Configurable* > configureables
protected
bool initialised
protected
std::list<const Inspectable* > inspectables
protected
AbstractController* maybe_controller
protected
std::string name
protected
std::list<PlotOption> plotOptions
protected
long int t
protected

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