knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::Printable Class Referenceabstract

#include <Printable.h>

Inheritance diagram for knowrob::Printable:

Public Member Functions

virtual ~Printable ()=default
 
virtual void write (std::ostream &os) const =0
 
virtual std::string format () const
 
virtual ~Printable ()=default
 
virtual void write (std::ostream &os) const =0
 
virtual std::string format () const
 

Detailed Description

Interface for objects that can be printed to a stream.

Definition at line 18 of file Printable.h.

Constructor & Destructor Documentation

◆ ~Printable() [1/2]

virtual knowrob::Printable::~Printable ( )
virtualdefault

◆ ~Printable() [2/2]

virtual knowrob::Printable::~Printable ( )
virtualdefault

Member Function Documentation

◆ format() [1/2]

virtual std::string knowrob::Printable::format ( ) const
inlinevirtual

Format this object as a string.

Returns
the string representation.

Definition at line 32 of file Printable.h.

32  {
33  std::stringstream ss;
34  write(ss);
35  return ss.str();
36  }
virtual void write(std::ostream &os) const =0

◆ format() [2/2]

virtual std::string knowrob::Printable::format ( ) const
inlinevirtual

Format this object as a string.

Returns
the string representation.

Definition at line 32 of file Printable.h.

32  {
33  std::stringstream ss;
34  write(ss);
35  return ss.str();
36  }

◆ write() [1/2]

virtual void knowrob::Printable::write ( std::ostream &  os) const
pure virtual

◆ write() [2/2]

virtual void knowrob::Printable::write ( std::ostream &  os) const
pure virtual

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