Chombo + EB  3.0
Public Member Functions | List of all members
Printable Class Referenceabstract

#include <Printable.H>

Public Member Functions

virtual ~Printable ()
 
virtual void print (std::ostream &) const =0
 

Detailed Description

This class encapsulates the concept of `printability', it automatically associates the output operator to a derived class via a virtual method to get around the problem of polymorphic operator being illegal in C++.

Typical usage: (1) inherit from Printable Class A : Class Printable (2) define the method print() in A (3) use '<<' operator for objects of class A

Variants of print can be added for different flavors.

Constructor & Destructor Documentation

◆ ~Printable()

virtual Printable::~Printable ( )
inlinevirtual

References print().

Member Function Documentation

◆ print()

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

Referenced by operator<<(), and ~Printable().


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