Regilo
A simple C++ library for controlling the Neato XV robot and the Hokuyo scanner.
regilo::ILog Class Referenceabstract

The ILog interface has to be implemented in all Log classes. More...

#include <log.hpp>

Inheritance diagram for regilo::ILog:
regilo::ITimedLog regilo::Log regilo::TimedLog< DurationT > regilo::TimedLog< DurationT >

Public Member Functions

virtual ~ILog ()=default
 Default destructor.
 
virtual const std::string & getFilePath () const =0
 Get the path of file if the log was created with a path otherwise the empty string. More...
 
virtual std::iostream & getStream ()=0
 Get the current underlying stream. More...
 
virtual bool isEnd () const =0
 Test if the stream is EOF. More...
 
virtual std::string read ()=0
 Read one command from the log. More...
 
virtual std::string read (std::string &logCommand)=0
 Read one command from the log. More...
 
virtual std::string readCommand (const std::string &command)=0
 Read specified command from the log (the others are skipped). More...
 
virtual std::string readCommand (const std::string &command, std::string &logCommand)=0
 Read specified command from the log (the others are skipped). More...
 
virtual void write (const std::string &command, const std::string &response)=0
 Write a command and response to the log. More...
 

Detailed Description

The ILog interface has to be implemented in all Log classes.

Member Function Documentation

virtual const std::string& regilo::ILog::getFilePath ( ) const
pure virtual

Get the path of file if the log was created with a path otherwise the empty string.

Returns
The path or empty string.

Implemented in regilo::Log.

virtual std::iostream& regilo::ILog::getStream ( )
pure virtual

Get the current underlying stream.

Returns
The underlying stream.

Implemented in regilo::Log.

virtual bool regilo::ILog::isEnd ( ) const
pure virtual

Test if the stream is EOF.

Returns
True if the log is in the EOF state.

Implemented in regilo::Log.

virtual std::string regilo::ILog::read ( )
pure virtual

Read one command from the log.

Returns
The response of the command.

Implemented in regilo::Log.

virtual std::string regilo::ILog::read ( std::string &  logCommand)
pure virtual

Read one command from the log.

Parameters
logCommandThe input of the command that was read.
Returns
The response of the command.

Implemented in regilo::TimedLog< DurationT >, and regilo::Log.

virtual std::string regilo::ILog::readCommand ( const std::string &  command)
pure virtual

Read specified command from the log (the others are skipped).

Parameters
commandThe command to read (The boost::algorithm::starts_with() method is used to compare).
Returns
The response of the command.

Implemented in regilo::Log.

virtual std::string regilo::ILog::readCommand ( const std::string &  command,
std::string &  logCommand 
)
pure virtual

Read specified command from the log (the others are skipped).

Parameters
commandThe command to read (The boost::algorithm::starts_with() method is used to compare).
logCommandThe input of the command that was read.
Returns
The response of the command.

Implemented in regilo::Log.

virtual void regilo::ILog::write ( const std::string &  command,
const std::string &  response 
)
pure virtual

Write a command and response to the log.

Parameters
commandThe command (with all parameters).
responseThe response of the command.

Implemented in regilo::TimedLog< DurationT >, and regilo::Log.


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