go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
xoutlibrary::xoutbase Class Referenceabstract

#include <xoutbase.h>

Detailed Description

Base class for xout.

An abstract base class, which defines the interface for using xout.

Definition at line 39 of file xoutbase.h.

Inheritance diagram for xoutlibrary::xoutbase:
Inheritance graph
[legend]

Public Types

using CStreamMapEntryType = CStreamMapType::value_type
 
using CStreamMapType = std::map< std::string, std::ostream * >
 
using Self = xoutbase
 
using XStreamMapEntryType = XStreamMapType::value_type
 
using XStreamMapType = std::map< std::string, Self * >
 

Public Member Functions

virtual int AddOutput (const char *name, Self *output)
 
virtual int AddOutput (const char *name, std::ostream *output)
 
virtual int AddTargetCell (const char *name, Self *cell)
 
virtual int AddTargetCell (const char *name, std::ostream *cell)
 
virtual const CStreamMapTypeGetCOutputs ()
 
virtual const XStreamMapTypeGetXOutputs ()
 
template<class T >
Selfoperator<< (const T &_arg)
 
Selfoperator<< (std::ios &(*pf)(std::ios &))
 
Selfoperator<< (std::ios_base &(*pf)(std::ios_base &))
 
Selfoperator<< (std::ostream &(*pf)(std::ostream &))
 
Selfoperator[] (const char *cellname)
 
virtual int RemoveOutput (const char *name)
 
virtual int RemoveTargetCell (const char *name)
 
virtual void SetOutputs (const CStreamMapType &outputmap)
 
virtual void SetOutputs (const XStreamMapType &outputmap)
 
virtual void WriteBufferedData ()
 
virtual ~xoutbase ()=0
 

Protected Member Functions

void SetCTargetCells (const CStreamMapType &cellmap)
 
virtual void SetXTargetCells (const XStreamMapType &cellmap)
 
 xoutbase ()=default
 

Protected Attributes

CStreamMapType m_COutputs
 
CStreamMapType m_CTargetCells
 
XStreamMapType m_XOutputs
 
XStreamMapType m_XTargetCells
 

Private Member Functions

template<class T >
SelfSendToTargets (const T &_arg)
 

Member Typedef Documentation

◆ CStreamMapEntryType

using xoutlibrary::xoutbase::CStreamMapEntryType = CStreamMapType::value_type

Definition at line 47 of file xoutbase.h.

◆ CStreamMapType

using xoutlibrary::xoutbase::CStreamMapType = std::map<std::string, std::ostream *>

Definition at line 45 of file xoutbase.h.

◆ Self

Typedef's.

Definition at line 43 of file xoutbase.h.

◆ XStreamMapEntryType

using xoutlibrary::xoutbase::XStreamMapEntryType = XStreamMapType::value_type

Definition at line 48 of file xoutbase.h.

◆ XStreamMapType

using xoutlibrary::xoutbase::XStreamMapType = std::map<std::string, Self *>

Definition at line 46 of file xoutbase.h.

Constructor & Destructor Documentation

◆ ~xoutbase()

virtual xoutlibrary::xoutbase::~xoutbase ( )
pure virtual

Destructor

◆ xoutbase()

xoutlibrary::xoutbase::xoutbase ( )
protecteddefault

Default-constructor. Only to be used by its derived classes.

Member Function Documentation

◆ AddOutput() [1/2]

virtual int xoutlibrary::xoutbase::AddOutput ( const char *  name,
Self output 
)
virtual

◆ AddOutput() [2/2]

virtual int xoutlibrary::xoutbase::AddOutput ( const char *  name,
std::ostream *  output 
)
virtual

Add/Remove an output stream (like cout, or an fstream, or an xout-object).

Reimplemented in xoutlibrary::xoutrow, and xoutlibrary::xoutsimple.

◆ AddTargetCell() [1/2]

virtual int xoutlibrary::xoutbase::AddTargetCell ( const char *  name,
Self cell 
)
virtual

◆ AddTargetCell() [2/2]

virtual int xoutlibrary::xoutbase::AddTargetCell ( const char *  name,
std::ostream *  cell 
)
virtual

Methods to Add and Remove target cells. They return 0 when successful.

◆ GetCOutputs()

virtual const CStreamMapType & xoutlibrary::xoutbase::GetCOutputs ( )
virtual

Get the output maps.

Reimplemented in xoutlibrary::xoutsimple.

◆ GetXOutputs()

virtual const XStreamMapType & xoutlibrary::xoutbase::GetXOutputs ( )
virtual

Reimplemented in xoutlibrary::xoutsimple.

◆ operator<<() [1/4]

template<class T >
Self & xoutlibrary::xoutbase::operator<< ( const T &  _arg)
inline

the << operator. A templated member function, and some overloads.

The overloads are required for manipulators, like std::endl. (these manipulators in fact are global template functions, and need to deduce their own template arguments) template < class T > Self & operator<<(T & _arg) { return this->SendToTargets(_arg); }

Definition at line 71 of file xoutbase.h.

◆ operator<<() [2/4]

Self & xoutlibrary::xoutbase::operator<< ( std::ios &(*)(std::ios &)  pf)
inline

Definition at line 85 of file xoutbase.h.

◆ operator<<() [3/4]

Self & xoutlibrary::xoutbase::operator<< ( std::ios_base &(*)(std::ios_base &)  pf)
inline

Definition at line 92 of file xoutbase.h.

◆ operator<<() [4/4]

Self & xoutlibrary::xoutbase::operator<< ( std::ostream &(*)(std::ostream &)  pf)
inline

Definition at line 78 of file xoutbase.h.

◆ operator[]()

Self & xoutlibrary::xoutbase::operator[] ( const char *  cellname)

The operator [] returns an x-cell

◆ RemoveOutput()

virtual int xoutlibrary::xoutbase::RemoveOutput ( const char *  name)
virtual

◆ RemoveTargetCell()

virtual int xoutlibrary::xoutbase::RemoveTargetCell ( const char *  name)
virtual

Reimplemented in xoutlibrary::xoutrow.

◆ SendToTargets()

template<class T >
Self & xoutlibrary::xoutbase::SendToTargets ( const T &  _arg)
inlineprivate

Definition at line 159 of file xoutbase.h.

◆ SetCTargetCells()

void xoutlibrary::xoutbase::SetCTargetCells ( const CStreamMapType cellmap)
protected

◆ SetOutputs() [1/2]

virtual void xoutlibrary::xoutbase::SetOutputs ( const CStreamMapType outputmap)
virtual

◆ SetOutputs() [2/2]

virtual void xoutlibrary::xoutbase::SetOutputs ( const XStreamMapType outputmap)
virtual

◆ SetXTargetCells()

virtual void xoutlibrary::xoutbase::SetXTargetCells ( const XStreamMapType cellmap)
protectedvirtual

Reimplemented in xoutlibrary::xoutrow.

◆ WriteBufferedData()

virtual void xoutlibrary::xoutbase::WriteBufferedData ( )
virtual

Field Documentation

◆ m_COutputs

CStreamMapType xoutlibrary::xoutbase::m_COutputs
protected

Maps that contain the outputs.

Definition at line 148 of file xoutbase.h.

◆ m_CTargetCells

CStreamMapType xoutlibrary::xoutbase::m_CTargetCells
protected

Maps that contain the target cells. The << operator passes its input to these maps.

Definition at line 153 of file xoutbase.h.

◆ m_XOutputs

XStreamMapType xoutlibrary::xoutbase::m_XOutputs
protected

Definition at line 149 of file xoutbase.h.

◆ m_XTargetCells

XStreamMapType xoutlibrary::xoutbase::m_XTargetCells
protected

Definition at line 154 of file xoutbase.h.



Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo