Jpp
18.0.0-rc.1
the software that should make you happy
|
Message streamer. More...
#include <JMessageStream.hh>
Public Types | |
typedef std::ostream &(* | io_manip )(std::ostream &) |
Type definition of I/O operator. More... | |
Public Member Functions | |
template<class T > | |
JMessageStream & | operator<< (const T &value) |
Appends value to internal buffer. More... | |
JMessageStream & | operator<< (io_manip manip) |
Append I/O manipulator. More... | |
Protected Member Functions | |
JMessageStream (JMessageLogger &__logger, void(JMessageLogger::*__typeout)(const std::string &)) | |
Constructor. More... | |
~JMessageStream () | |
Report message. More... | |
Protected Attributes | |
JMessageLogger & | logger |
void(JMessageLogger::* | typeout )(const std::string &) |
Message streamer.
This class can be used in the same way as the STL ostream operator.
The actual message is reported on detruction of the object, e.g:
JStreamLogger logger(std::cout);
JDebugStream (logger) << "This is a debug message " << hex << 15;
will produce on the terminal:
"... This is a debug message f"
where ...
stands for the message prefix (see class JMessageLogger). The list of available message streamer classes includes:
Definition at line 43 of file JMessageStream.hh.
typedef std::ostream&(* JLOGGER::JMessageStream::io_manip)(std::ostream &) |
Type definition of I/O operator.
Definition at line 65 of file JMessageStream.hh.
|
inlineprotected |
Constructor.
__logger | message logger |
__typeout | logger method |
Definition at line 88 of file JMessageStream.hh.
|
inlineprotected |
Report message.
Definition at line 99 of file JMessageStream.hh.
|
inline |
Appends value to internal buffer.
value | value |
Definition at line 54 of file JMessageStream.hh.
|
inline |
Append I/O manipulator.
manip | I/O manipulator |
Definition at line 74 of file JMessageStream.hh.
|
protected |
Definition at line 105 of file JMessageStream.hh.
|
protected |
Definition at line 106 of file JMessageStream.hh.