RobWorkProject  23.9.11-
Public Types | Public Member Functions | List of all members
LogStep Class Reference

A special type of scope that is also a simulation step. More...

#include <LogStep.hpp>

Inherits SimulatorLogScope.

Public Types

typedef rw::core::Ptr< LogStepPtr
 Smart pointer type of LogStep.
 
- Public Types inherited from SimulatorLogScope
typedef rw::core::Ptr< SimulatorLogScopePtr
 Smart pointer type of SimulatorLogScope.
 
- Public Types inherited from SimulatorLog
typedef rw::core::Ptr< SimulatorLogPtr
 Smart pointer type of SimulatorLog.
 
typedef rw::core::Ptr< const SimulatorLogCPtr
 Smart pointer type of const SimulatorLog.
 

Public Member Functions

 LogStep (SimulatorLogScope *parent)
 Constructor. More...
 
virtual ~LogStep ()
 Destructor.
 
virtual void read (class rw::common::InputArchive &iarchive, const std::string &id)
 
virtual void write (class rw::common::OutputArchive &oarchive, const std::string &id) const
 
virtual std::string getType () const
 Get a textual representation of the type of the item. More...
 
virtual bool operator== (const SimulatorLog &b) const
 Check if logs are identical. More...
 
virtual std::string getDescription () const
 Get a string describing this entry. More...
 
virtual double timeBegin () const
 Get the time at the beginning of timestep. More...
 
virtual double timeEnd () const
 Get the time at the end of timestep. More...
 
virtual void setTimeBegin (double time)
 Set the time at the beginning of timestep. More...
 
virtual void setTimeEnd (double time)
 Set the time at the end of timestep. More...
 
- Public Member Functions inherited from SimulatorLogScope
 SimulatorLogScope (SimulatorLogScope *parent=NULL)
 Constructor. More...
 
virtual ~SimulatorLogScope ()
 Destructor.
 
virtual std::size_t children () const
 Get the number of children under this log item. More...
 
std::vector< SimulatorLog::PtrgetChildren () const
 Get the children of this scope. More...
 
SimulatorLog::Ptr getChild (std::size_t id) const
 Get a specific child item. More...
 
std::size_t indexOf (const SimulatorLog *child) const
 Get the id of a specific log item that is known to be a child. More...
 
void appendChild (SimulatorLog::Ptr child)
 Add a child to this scope. More...
 
rw::core::Ptr< const SimulatorStatisticsgetStatistics ()
 Get statistics for this scope. More...
 
virtual int lineBegin () const
 Get the line in the file where this scope begins. More...
 
virtual int lineEnd () const
 Get the line in the file where this scope ends. More...
 
virtual void setLineBegin (int line)
 Set the line in the file where this scope begins. More...
 
virtual void setLineEnd (int line)
 Set the line in the file where this scope ends. More...
 
- Public Member Functions inherited from SimulatorLog
 SimulatorLog (SimulatorLogScope *parent=NULL)
 Constructor. More...
 
virtual ~SimulatorLog ()
 Destructor.
 
virtual SimulatorLogScopegetParent () const
 Get the parent of this log item. More...
 
virtual bool operator!= (const SimulatorLog &b) const
 Check if logs are non-identical. More...
 
virtual std::string getFilename () const
 Get the full filename with path for where this log entry was created. More...
 
virtual void setFilename (const std::string &file)
 Set the name of the file where this log entry was created. More...
 
virtual void setFilename (const char *file)
 Set the name of the file where this log entry was created. More...
 
virtual void setDescription (const std::string &description)
 Set a very short description of this entry. More...
 
- Public Member Functions inherited from Serializable
virtual ~Serializable ()
 destructor
 

Detailed Description

A special type of scope that is also a simulation step.

This scope saves additional information about the time step taken.

Constructor & Destructor Documentation

◆ LogStep()

LogStep ( SimulatorLogScope parent)

Constructor.

Note
This item will not be added as a child to the parent scope using this constructor.
Parameters
parentthe parent of this log item.

Member Function Documentation

◆ getDescription()

virtual std::string getDescription ( ) const
virtual

Get a string describing this entry.

Returns
the string.

Reimplemented from SimulatorLog.

◆ getType()

virtual std::string getType ( ) const
virtual

Get a textual representation of the type of the item.

Returns
the type of item as a string.

Reimplemented from SimulatorLogScope.

◆ operator==()

virtual bool operator== ( const SimulatorLog b) const
virtual

Check if logs are identical.

Parameters
b[in] other log to compare with.
Returns
true if identical, false otherwise.

Reimplemented from SimulatorLogScope.

◆ read()

virtual void read ( class rw::common::InputArchive iarchive,
const std::string &  id 
)
virtual

Enable read-serialization of inherited class by implementing this method. Data is read from iarchive and filled into this object.

Parameters
iarchive[in] the InputArchive from which to read data.
id[in] The id of the serialized sobject.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

Reimplemented from SimulatorLogScope.

◆ setTimeBegin()

virtual void setTimeBegin ( double  time)
virtual

Set the time at the beginning of timestep.

Parameters
time[in] the initial time.

◆ setTimeEnd()

virtual void setTimeEnd ( double  time)
virtual

Set the time at the end of timestep.

Parameters
time[in] the final time.

◆ timeBegin()

virtual double timeBegin ( ) const
virtual

Get the time at the beginning of timestep.

Returns
the initial time.

◆ timeEnd()

virtual double timeEnd ( ) const
virtual

Get the time at the end of timestep.

Returns
the final time.

◆ write()

virtual void write ( class rw::common::OutputArchive oarchive,
const std::string &  id 
) const
virtual

Enable write-serialization of inherited class by implementing this method. Data is written to oarchive from this object.

Parameters
oarchive[out] the OutputArchive in which data should be written.
id[in] The id of the serialized sobject.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

Reimplemented from SimulatorLogScope.


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