PLaSK library
Loading...
Searching...
No Matches
plask::Printable Struct Referenceabstract

Base class / helper for printable classes with virtual print method. More...

#include <plask/utils/string.hpp>

Inheritance diagram for plask::Printable:
[legend]

Public Member Functions

virtual void print (std::ostream &out) const =0
 Print this to stream out.
 
virtual ~Printable ()
 
std::string str () const
 Get string representation of this using print method.
 

Friends

std::ostream & operator<< (std::ostream &out, const Printable &to_print)
 Print this to stream using print method.
 

Detailed Description

Base class / helper for printable classes with virtual print method.

Definition at line 37 of file string.hpp.

Constructor & Destructor Documentation

◆ ~Printable()

plask::Printable::~Printable ( )
virtual

Definition at line 20 of file string.cpp.

Member Function Documentation

◆ print()

virtual void plask::Printable::print ( std::ostream &  out) const
pure virtual

◆ str()

std::string plask::Printable::str ( ) const

Get string representation of this using print method.

Returns
string representation of this

Definition at line 23 of file string.cpp.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
const Printable to_print 
)
friend

Print this to stream using print method.

Parameters
outprint destination, output stream
to_printvector to print
Returns
out stream

Definition at line 53 of file string.hpp.


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