go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Data Structures | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
xoutlibrary::xoutbase< charT, traits > Class Template Reference

#include <xoutbase.h>

Detailed Description

template<class charT, class traits = char_traits< charT >>
class xoutlibrary::xoutbase< charT, traits >

Base class for xout.

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

Definition at line 47 of file xoutbase.h.

Data Structures

class  Send
 

Public Types

typedef charT char_type
 
typedef CStreamMapType::value_type CStreamMapEntryType
 
typedef CStreamMapType::iterator CStreamMapIteratorType
 
typedef std::map< std::string, ostream_type * > CStreamMapType
 
typedef traits::int_type int_type
 
typedef basic_ios< charT, traits > ios_type
 
typedef traits::off_type off_type
 
typedef basic_ostream< charT, traits > ostream_type
 
typedef traits::pos_type pos_type
 
typedef xoutbase Self
 
typedef traits traits_type
 
typedef XStreamMapType::value_type XStreamMapEntryType
 
typedef XStreamMapType::iterator XStreamMapIteratorType
 
typedef std::map< std::string, Self * > XStreamMapType
 

Public Member Functions

virtual int AddOutput (const char *name, ostream_type *output)
 
virtual int AddOutput (const char *name, Self *output)
 
virtual int AddTargetCell (const char *)
 
virtual int AddTargetCell (const char *name, ostream_type *cell)
 
virtual int AddTargetCell (const char *name, Self *cell)
 
virtual const CStreamMapTypeGetCOutputs (void)
 
virtual const XStreamMapTypeGetXOutputs (void)
 
template<class T >
Selfoperator<< (const T &_arg)
 
Selfoperator<< (ios_base &(*pf)(ios_base &))
 
Selfoperator<< (ios_type &(*pf)(ios_type &))
 
Selfoperator<< (ostream_type &(*pf)(ostream_type &))
 
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 SetTargetCells (const CStreamMapType &cellmap)
 
virtual void SetTargetCells (const XStreamMapType &cellmap)
 
virtual void WriteBufferedData (void)
 
 xoutbase ()=default
 
virtual ~xoutbase ()=default
 

Protected Member Functions

virtual void Callback (void)
 
virtual SelfSelectXCell (const char *name)
 
template<class T >
SelfSendToTargets (const T &_arg)
 

Protected Attributes

bool m_Call { false }
 
CStreamMapType m_COutputs
 
CStreamMapType m_CTargetCells
 
XStreamMapType m_XOutputs
 
XStreamMapType m_XTargetCells
 

Member Typedef Documentation

◆ char_type

template<class charT , class traits = char_traits< charT >>
typedef charT xoutlibrary::xoutbase< charT, traits >::char_type

Definition at line 55 of file xoutbase.h.

◆ CStreamMapEntryType

template<class charT , class traits = char_traits< charT >>
typedef CStreamMapType::value_type xoutlibrary::xoutbase< charT, traits >::CStreamMapEntryType

Definition at line 66 of file xoutbase.h.

◆ CStreamMapIteratorType

template<class charT , class traits = char_traits< charT >>
typedef CStreamMapType::iterator xoutlibrary::xoutbase< charT, traits >::CStreamMapIteratorType

Definition at line 64 of file xoutbase.h.

◆ CStreamMapType

template<class charT , class traits = char_traits< charT >>
typedef std::map< std::string, ostream_type * > xoutlibrary::xoutbase< charT, traits >::CStreamMapType

Definition at line 62 of file xoutbase.h.

◆ int_type

template<class charT , class traits = char_traits< charT >>
typedef traits::int_type xoutlibrary::xoutbase< charT, traits >::int_type

Definition at line 56 of file xoutbase.h.

◆ ios_type

template<class charT , class traits = char_traits< charT >>
typedef basic_ios< charT, traits > xoutlibrary::xoutbase< charT, traits >::ios_type

Definition at line 60 of file xoutbase.h.

◆ off_type

template<class charT , class traits = char_traits< charT >>
typedef traits::off_type xoutlibrary::xoutbase< charT, traits >::off_type

Definition at line 58 of file xoutbase.h.

◆ ostream_type

template<class charT , class traits = char_traits< charT >>
typedef basic_ostream< charT, traits > xoutlibrary::xoutbase< charT, traits >::ostream_type

Definition at line 59 of file xoutbase.h.

◆ pos_type

template<class charT , class traits = char_traits< charT >>
typedef traits::pos_type xoutlibrary::xoutbase< charT, traits >::pos_type

Definition at line 57 of file xoutbase.h.

◆ Self

template<class charT , class traits = char_traits< charT >>
typedef xoutbase xoutlibrary::xoutbase< charT, traits >::Self

Typedef's.

Definition at line 52 of file xoutbase.h.

◆ traits_type

template<class charT , class traits = char_traits< charT >>
typedef traits xoutlibrary::xoutbase< charT, traits >::traits_type

Definition at line 54 of file xoutbase.h.

◆ XStreamMapEntryType

template<class charT , class traits = char_traits< charT >>
typedef XStreamMapType::value_type xoutlibrary::xoutbase< charT, traits >::XStreamMapEntryType

Definition at line 67 of file xoutbase.h.

◆ XStreamMapIteratorType

template<class charT , class traits = char_traits< charT >>
typedef XStreamMapType::iterator xoutlibrary::xoutbase< charT, traits >::XStreamMapIteratorType

Definition at line 65 of file xoutbase.h.

◆ XStreamMapType

template<class charT , class traits = char_traits< charT >>
typedef std::map< std::string, Self * > xoutlibrary::xoutbase< charT, traits >::XStreamMapType

Definition at line 63 of file xoutbase.h.

Constructor & Destructor Documentation

◆ xoutbase()

template<class charT , class traits = char_traits< charT >>
xoutlibrary::xoutbase< charT, traits >::xoutbase ( )
default

Constructors

◆ ~xoutbase()

template<class charT , class traits = char_traits< charT >>
virtual xoutlibrary::xoutbase< charT, traits >::~xoutbase ( )
virtualdefault

Destructor

Member Function Documentation

◆ AddOutput() [1/2]

template<class charT , class traits = char_traits< charT >>
virtual int xoutlibrary::xoutbase< charT, traits >::AddOutput ( const char *  name,
ostream_type output 
)
virtual

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

◆ AddOutput() [2/2]

template<class charT , class traits = char_traits< charT >>
virtual int xoutlibrary::xoutbase< charT, traits >::AddOutput ( const char *  name,
Self output 
)
virtual

◆ AddTargetCell() [1/3]

template<class charT , class traits = char_traits< charT >>
virtual int xoutlibrary::xoutbase< charT, traits >::AddTargetCell ( const char *  )
inlinevirtual

Reimplemented in xoutlibrary::xoutrow< charT, traits >.

Definition at line 127 of file xoutbase.h.

◆ AddTargetCell() [2/3]

template<class charT , class traits = char_traits< charT >>
virtual int xoutlibrary::xoutbase< charT, traits >::AddTargetCell ( const char *  name,
ostream_type cell 
)
virtual

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

◆ AddTargetCell() [3/3]

template<class charT , class traits = char_traits< charT >>
virtual int xoutlibrary::xoutbase< charT, traits >::AddTargetCell ( const char *  name,
Self cell 
)
virtual

◆ Callback()

template<class charT , class traits = char_traits< charT >>
virtual void xoutlibrary::xoutbase< charT, traits >::Callback ( void  )
inlineprotectedvirtual

Called each time << is used, but only when m_Call == true;

Definition at line 169 of file xoutbase.h.

◆ GetCOutputs()

template<class charT , class traits = char_traits< charT >>
virtual const CStreamMapType & xoutlibrary::xoutbase< charT, traits >::GetCOutputs ( void  )
virtual

Get the output maps.

Reimplemented in xoutlibrary::xoutsimple< charT, traits >.

◆ GetXOutputs()

template<class charT , class traits = char_traits< charT >>
virtual const XStreamMapType & xoutlibrary::xoutbase< charT, traits >::GetXOutputs ( void  )
virtual

◆ operator<<() [1/4]

template<class charT , class traits = char_traits< charT >>
template<class T >
Self & xoutlibrary::xoutbase< charT, traits >::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 94 of file xoutbase.h.

◆ operator<<() [2/4]

template<class charT , class traits = char_traits< charT >>
Self & xoutlibrary::xoutbase< charT, traits >::operator<< ( ios_base &(*)(ios_base &)  pf)
inline

Definition at line 112 of file xoutbase.h.

◆ operator<<() [3/4]

template<class charT , class traits = char_traits< charT >>
Self & xoutlibrary::xoutbase< charT, traits >::operator<< ( ios_type &(*)(ios_type &)  pf)
inline

Definition at line 106 of file xoutbase.h.

◆ operator<<() [4/4]

template<class charT , class traits = char_traits< charT >>
Self & xoutlibrary::xoutbase< charT, traits >::operator<< ( ostream_type &(*)(ostream_type &)  pf)
inline

Definition at line 100 of file xoutbase.h.

◆ operator[]()

template<class charT , class traits = char_traits< charT >>
Self & xoutlibrary::xoutbase< charT, traits >::operator[] ( const char *  cellname)
inline

The operator [] simply calls this->SelectXCell(cellname). It returns an x-cell

◆ RemoveOutput()

template<class charT , class traits = char_traits< charT >>
virtual int xoutlibrary::xoutbase< charT, traits >::RemoveOutput ( const char *  name)
virtual

◆ RemoveTargetCell()

template<class charT , class traits = char_traits< charT >>
virtual int xoutlibrary::xoutbase< charT, traits >::RemoveTargetCell ( const char *  name)
virtual

◆ SelectXCell()

template<class charT , class traits = char_traits< charT >>
virtual Self & xoutlibrary::xoutbase< charT, traits >::SelectXCell ( const char *  name)
protectedvirtual

Returns a target cell.

Reimplemented in xoutlibrary::xoutrow< charT, traits >.

◆ SendToTargets()

template<class charT , class traits = char_traits< charT >>
template<class T >
Self & xoutlibrary::xoutbase< charT, traits >::SendToTargets ( const T &  _arg)
inlineprotected

Definition at line 172 of file xoutbase.h.

◆ SetOutputs() [1/2]

template<class charT , class traits = char_traits< charT >>
virtual void xoutlibrary::xoutbase< charT, traits >::SetOutputs ( const CStreamMapType outputmap)
virtual

◆ SetOutputs() [2/2]

template<class charT , class traits = char_traits< charT >>
virtual void xoutlibrary::xoutbase< charT, traits >::SetOutputs ( const XStreamMapType outputmap)
virtual

◆ SetTargetCells() [1/2]

template<class charT , class traits = char_traits< charT >>
virtual void xoutlibrary::xoutbase< charT, traits >::SetTargetCells ( const CStreamMapType cellmap)
virtual

◆ SetTargetCells() [2/2]

template<class charT , class traits = char_traits< charT >>
virtual void xoutlibrary::xoutbase< charT, traits >::SetTargetCells ( const XStreamMapType cellmap)
virtual

◆ WriteBufferedData()

template<class charT , class traits = char_traits< charT >>
virtual void xoutlibrary::xoutbase< charT, traits >::WriteBufferedData ( void  )
virtual

Field Documentation

◆ m_Call

template<class charT , class traits = char_traits< charT >>
bool xoutlibrary::xoutbase< charT, traits >::m_Call { false }
protected

Boolean that says whether the Callback-function must be called. False by default.

Definition at line 166 of file xoutbase.h.

◆ m_COutputs

template<class charT , class traits = char_traits< charT >>
CStreamMapType xoutlibrary::xoutbase< charT, traits >::m_COutputs
protected

Maps that contain the outputs.

Definition at line 156 of file xoutbase.h.

◆ m_CTargetCells

template<class charT , class traits = char_traits< charT >>
CStreamMapType xoutlibrary::xoutbase< charT, traits >::m_CTargetCells
protected

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

Definition at line 161 of file xoutbase.h.

◆ m_XOutputs

template<class charT , class traits = char_traits< charT >>
XStreamMapType xoutlibrary::xoutbase< charT, traits >::m_XOutputs
protected

Definition at line 157 of file xoutbase.h.

◆ m_XTargetCells

template<class charT , class traits = char_traits< charT >>
XStreamMapType xoutlibrary::xoutbase< charT, traits >::m_XTargetCells
protected

Definition at line 162 of file xoutbase.h.



Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo