DGtal 1.4.0
Loading...
Searching...
No Matches
LibBoard::MessageStream Class Reference

#include <Board/Tools.h>

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

◆ MessageStream()

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

Definition at line 46 of file Tools.h.

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

Referenced by operator<<().

Member Function Documentation

◆ operator<<()

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

Definition at line 53 of file Tools.h.

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

References _out, _prefix, and MessageStream().

Field Documentation

◆ _out

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

Definition at line 38 of file Tools.h.

Referenced by operator<<().

◆ _prefix

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: