DGtal  0.9.3beta
Public Member Functions | Private Attributes
LibBoard::MessageStream Class Reference

#include <Board/Tools.h>

Collaboration diagram for LibBoard::MessageStream:
[legend]

Public Member Functions

 MessageStream (std::ostream &out, const char *prefix)
 
template<typename T >
MessageStream operator<< (const T &v)
 

Private Attributes

std::ostream & _out
 
const char * _prefix
 

Detailed Description

A "prefixable" message stream

Definition at line 29 of file Tools.h.

Constructor & Destructor Documentation

LibBoard::MessageStream::MessageStream ( std::ostream &  out,
const char *  prefix 
)
inline

Definition at line 46 of file Tools.h.

Referenced by operator<<().

47  : _out( out ),
48  _prefix( prefix )
49  {
50  }
std::ostream & _out
Definition: Tools.h:38
const char * _prefix
Definition: Tools.h:39

Member Function Documentation

template<typename T >
MessageStream LibBoard::MessageStream::operator<< ( const T &  v)
inline

Definition at line 53 of file Tools.h.

References _out, _prefix, and MessageStream().

54  {
55  if ( _prefix )
56  _out << _prefix << v;
57  else
58  _out << v;
59  return MessageStream( _out, 0 );
60  }
std::ostream & _out
Definition: Tools.h:38
const char * _prefix
Definition: Tools.h:39
MessageStream(std::ostream &out, const char *prefix)
Definition: Tools.h:46

Field Documentation

std::ostream& LibBoard::MessageStream::_out
private

Definition at line 38 of file Tools.h.

Referenced by operator<<().

const char* LibBoard::MessageStream::_prefix
private

Definition at line 39 of file Tools.h.

Referenced by operator<<().


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