PLaSK library

Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
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

Print this to stream `out`.

Parameters

  out | print destination, output stream

Implemented in plask::align::details::PositionAlignerImpl< direction >, plask::align::details::AlignerCustomImpl< direction, strategy, name_tag >, plask::MeshD< dimension >, plask::MeshD< 1 >, plask::MeshD< 2 >, plask::MeshD< 3 >, plask::MeshD< DIM >, and plask::MeshD< dim >.

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

  out | print destination, output stream
  to_print | vector to print

Returns
  out stream

Definition at line 53 of file string.hpp.

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

- plask/utils/string.hpp
- plask/utils/string.cpp