RobWorkProject  23.9.11-
Public Types | Public Member Functions | List of all members
SimulatorLog Class Referenceabstract

Base class for a hierarchical simulator log. More...

#include <SimulatorLog.hpp>

Inherits Serializable.

Inherited by SimulatorLogEntry, and SimulatorLogScope.

Public Types

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

 SimulatorLog (SimulatorLogScope *parent=NULL)
 Constructor. More...
 
virtual ~SimulatorLog ()
 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 SimulatorLogScopegetParent () const
 Get the parent of this log item. More...
 
virtual std::size_t children () const =0
 Get the number of children under this log item. More...
 
virtual std::string getType () const =0
 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 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 std::string getDescription () const
 Get a string describing this entry. 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

Base class for a hierarchical simulator log.

Every log item should have a filename that refers to the file that added the log item, as well as a description that is as short as possible.

Constructor & Destructor Documentation

◆ SimulatorLog()

SimulatorLog ( SimulatorLogScope parent = NULL)

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

◆ children()

virtual std::size_t children ( ) const
pure virtual

Get the number of children under this log item.

Returns
the number of children.

Implemented in SimulatorLogScope, and SimulatorLogEntry.

◆ getDescription()

virtual std::string getDescription ( ) const
virtual

Get a string describing this entry.

Returns
the string.

Reimplemented in LogStep.

◆ getFilename()

virtual std::string getFilename ( ) const
virtual

Get the full filename with path for where this log entry was created.

Returns
the full filename.

◆ getParent()

virtual SimulatorLogScope* getParent ( ) const
virtual

Get the parent of this log item.

Returns
the parent (NULL if no parent).

◆ getType()

virtual std::string getType ( ) const
pure virtual

◆ operator!=()

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

Check if logs are non-identical.

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

◆ operator==()

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

◆ 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.

Implements Serializable.

Reimplemented in SimulatorLogScope, SimulatorLogEntry, LogVelocities, LogValues, LogStep, LogPositions, LogMessage, LogForceTorque, LogEquationSystem, LogDistanceResult, LogDistanceMultiResult, LogContactVelocities, LogContactSet, LogConstraints, and LogCollisionResult.

◆ setDescription()

virtual void setDescription ( const std::string &  description)
virtual

Set a very short description of this entry.

Parameters
description[in] the description to set.

◆ setFilename() [1/2]

virtual void setFilename ( const char *  file)
virtual

Set the name of the file where this log entry was created.

Parameters
file[in] the filename (expected to have full path included).

◆ setFilename() [2/2]

virtual void setFilename ( const std::string &  file)
virtual

Set the name of the file where this log entry was created.

Parameters
file[in] the filename (expected to have full path included).

◆ 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.

Implements Serializable.

Reimplemented in SimulatorLogScope, SimulatorLogEntry, LogVelocities, LogValues, LogStep, LogPositions, LogMessage, LogForceTorque, LogEquationSystem, LogDistanceResult, LogDistanceMultiResult, LogContactVelocities, LogContactSet, LogConstraints, and LogCollisionResult.


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