#include <CategoryStream.hh>
Public Types | |
typedef CategoryStream &(* | cspf) (CategoryStream &) |
Public Member Functions | |
CategoryStream (Category &category, Priority::Value priority) | |
void | flush () |
Category & | getCategory () const |
Priority::Value | getPriority () const throw () |
template<typename T > | |
CategoryStream & | operator<< (const T &t) |
CategoryStream & | operator<< (const char *t) |
template<typename T > | |
CategoryStream & | operator<< (const std::string &t) |
CategoryStream & | operator<< (cspf) |
std::streamsize | width (std::streamsize wide) |
~CategoryStream () | |
Private Attributes | |
union { | |
std::ostringstream * _buffer | |
}; | |
Category & | _category |
Priority::Value | _priority |
Friends | |
LOG4CPP_EXPORT friend CategoryStream & | eol (CategoryStream &os) |
LOG4CPP_EXPORT friend CategoryStream & | left (CategoryStream &os) |
This class enables streaming simple types and objects to a category. Use category.errorStream(), etc. to obtain a CategoryStream class.
Definition at line 39 of file CategoryStream.hh.
typedef CategoryStream&(* log4cpp::CategoryStream::cspf) (CategoryStream &) |
Definition at line 138 of file CategoryStream.hh.
log4cpp::CategoryStream::CategoryStream | ( | Category & | category, |
Priority::Value | priority | ||
) |
Construct a CategoryStream for given Category with given priority.
category | The category this stream will send log messages to. |
priority | The priority the log messages will get or Priority::NOTSET to silently discard any streamed in messages. |
Definition at line 21 of file CategoryStream.cpp.
log4cpp::CategoryStream::~CategoryStream | ( | ) |
Destructor for CategoryStream
Definition at line 27 of file CategoryStream.cpp.
void log4cpp::CategoryStream::flush | ( | ) |
Flush the contents of the stream buffer to the Category and empties the buffer.
Definition at line 31 of file CategoryStream.cpp.
|
inline |
Returns the destination Category for this stream.
Definition at line 59 of file CategoryStream.hh.
|
inline |
Returns the priority for this stream.
Definition at line 65 of file CategoryStream.hh.
|
inline |
Stream in arbitrary types and objects.
t | The value or object to stream in. |
Definition at line 81 of file CategoryStream.hh.
CategoryStream & log4cpp::CategoryStream::operator<< | ( | const char * | t | ) |
Definition at line 39 of file CategoryStream.cpp.
|
inline |
Definition at line 96 of file CategoryStream.hh.
CategoryStream & log4cpp::CategoryStream::operator<< | ( | cspf | pf | ) |
Definition at line 62 of file CategoryStream.cpp.
std::streamsize log4cpp::CategoryStream::width | ( | std::streamsize | wide | ) |
Set the width output on CategoryStream
Definition at line 52 of file CategoryStream.cpp.
|
friend |
eol manipulator
Definition at line 65 of file CategoryStream.cpp.
|
friend |
left manipulator
Definition at line 71 of file CategoryStream.cpp.
union { ... } |
std::ostringstream* log4cpp::CategoryStream::_buffer |
Definition at line 131 of file CategoryStream.hh.
|
private |
Definition at line 128 of file CategoryStream.hh.
|
private |
Definition at line 129 of file CategoryStream.hh.