Public Types | Public Member Functions | Private Attributes | Friends | List of all members
log4cpp::CategoryStream Class Reference

#include <CategoryStream.hh>

Public Types

typedef CategoryStream &(* cspf) (CategoryStream &)

Public Member Functions

 CategoryStream (Category &category, Priority::Value priority)
void flush ()
CategorygetCategory () const
Priority::Value getPriority () const throw ()
template<typename T >
CategoryStreamoperator<< (const T &t)
CategoryStreamoperator<< (const char *t)
template<typename T >
CategoryStreamoperator<< (const std::string &t)
CategoryStreamoperator<< (cspf)
std::streamsize width (std::streamsize wide)
 ~CategoryStream ()

Private Attributes

union {
   std::ostringstream *   _buffer
Priority::Value _priority


LOG4CPP_EXPORT friend CategoryStreameol (CategoryStream &os)
LOG4CPP_EXPORT friend CategoryStreamleft (CategoryStream &os)

Detailed Description

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.

Member Typedef Documentation

typedef CategoryStream&(* log4cpp::CategoryStream::cspf) (CategoryStream &)

Definition at line 138 of file CategoryStream.hh.

Constructor & Destructor Documentation

log4cpp::CategoryStream::CategoryStream ( Category category,
Priority::Value  priority 

Construct a CategoryStream for given Category with given priority.

categoryThe category this stream will send log messages to.
priorityThe 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.

Member Function Documentation

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.

Category& log4cpp::CategoryStream::getCategory ( ) const

Returns the destination Category for this stream.

The Category.

Definition at line 59 of file CategoryStream.hh.

Priority::Value log4cpp::CategoryStream::getPriority ( ) const
throw (

Returns the priority for this stream.

The priority.

Definition at line 65 of file CategoryStream.hh.

template<typename T >
CategoryStream& log4cpp::CategoryStream::operator<< ( const T &  t)

Stream in arbitrary types and objects.

tThe value or object to stream in.
A reference to itself.

Definition at line 81 of file CategoryStream.hh.

CategoryStream & log4cpp::CategoryStream::operator<< ( const char *  t)

Definition at line 39 of file CategoryStream.cpp.

template<typename T >
CategoryStream& log4cpp::CategoryStream::operator<< ( const std::string &  t)

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.

Friends And Related Function Documentation

LOG4CPP_EXPORT friend CategoryStream& eol ( CategoryStream os)

eol manipulator

Definition at line 65 of file CategoryStream.cpp.

LOG4CPP_EXPORT friend CategoryStream& left ( CategoryStream os)

left manipulator

Definition at line 71 of file CategoryStream.cpp.

Member Data Documentation

union { ... }
std::ostringstream* log4cpp::CategoryStream::_buffer

Definition at line 131 of file CategoryStream.hh.

Category& log4cpp::CategoryStream::_category

Definition at line 128 of file CategoryStream.hh.

Priority::Value log4cpp::CategoryStream::_priority

Definition at line 129 of file CategoryStream.hh.

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

Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Jun 23 2019 19:10:00