
log4cpp:CategoryStream (3)
NAME
log4cpp::CategoryStream - This class enables streaming simple types and
objects to a category.
SYNOPSIS
#include <CategoryStream.hh>
Public Types
enum Separator { ENDLINE }
Enumeration of special 'Separators'.
Public Methods
CategoryStream (Category &category, Priority::Value priority)
Construct a CategoryStream for given Category with given priority.
~CategoryStream ()
Destructor for CategoryStream.
Category & getCategory () const
Returns the destination Category for this stream.
Priority::Value getPriority () const throw ()
Returns the priority for this stream.
CategoryStream & operator<< (Separator separator)
Streams in a Separator.
void flush ()
Flush the contents of the stream buffer to the Category and empties
the buffer.
template<typename T> CategoryStream & operator<< (const T &t)
Stream in arbitrary types and objects.
DETAILED DESCRIPTION
This class enables streaming simple types and objects to a category.
Use category.errorStream(), etc. to obtain a CategoryStream class.
MEMBER ENUMERATION DOCUMENTATION
enum log4cpp::CategoryStream::Separator
Enumeration of special 'Separators'.
Currently only contains the 'ENDLINE' separator, which separates two
log messages.
Enumeration values:
ENDLINE
CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
log4cpp::CategoryStream::CategoryStream (Category & category,
Priority::Value priority)
Construct a CategoryStream for given Category with given priority.
Parameters:
category
MEMBER FUNCTION DOCUMENTATION
void log4cpp::CategoryStream::flush ()
Flush the contents of the stream buffer to the Category and empties the
buffer.
Category& log4cpp::CategoryStream::getCategory () const [inline]
Returns the destination Category for this stream.
Returns:
The Category.
Priority::Value log4cpp::CategoryStream::getPriority () const throw ()
[inline]
Returns the priority for this stream.
Returns:
The priority.
template<typename T> CategoryStream& log4cpp::CategoryStream::operator<<
(const T & t) [inline]
Stream in arbitrary types and objects.
Parameters:
t The value or object to stream in.
Returns:
A reference to itself.
CategoryStream & log4cpp::CategoryStream::operator<< (Separator separator)
Streams in a Separator.
If the separator equals CategoryStream::ENDLINE it sends the contents
of the stream buffer to the Category with set priority and empties the
buffer.
Parameters:
Separator
The Separator
Returns:
A reference to itself.
AUTHOR
Generated automatically by Doxygen for log4cpp from the source code.
log4cpp 19 Aug 2003 log4cpp::CategoryStream(3)