Apache log4cxx  Version 0.10.0
CharMessageBuffer Class Reference

This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the message parameter. More...

Public Member Functions

 CharMessageBuffer ()
 Creates a new instance. More...
 
 ~CharMessageBuffer ()
 Destructor. More...
 
CharMessageBufferoperator<< (const std::basic_string< char > &msg)
 Appends string to buffer. More...
 
CharMessageBufferoperator<< (const char *msg)
 Appends string to buffer. More...
 
CharMessageBufferoperator<< (char *msg)
 Appends string to buffer. More...
 
CharMessageBufferoperator<< (const char msg)
 Appends character to buffer. More...
 
std::ostream & operator<< (ios_base_manip manip)
 Insertion operator for STL manipulators such as std::fixed. More...
 
std::ostream & operator<< (bool val)
 Insertion operator for built-in type. More...
 
std::ostream & operator<< (short val)
 Insertion operator for built-in type. More...
 
std::ostream & operator<< (int val)
 Insertion operator for built-in type. More...
 
std::ostream & operator<< (unsigned int val)
 Insertion operator for built-in type. More...
 
std::ostream & operator<< (long val)
 Insertion operator for built-in type. More...
 
std::ostream & operator<< (unsigned long val)
 Insertion operator for built-in type. More...
 
std::ostream & operator<< (float val)
 Insertion operator for built-in type. More...
 
std::ostream & operator<< (double val)
 Insertion operator for built-in type. More...
 
std::ostream & operator<< (long double val)
 Insertion operator for built-in type. More...
 
std::ostream & operator<< (void *val)
 Insertion operator for built-in type. More...
 
 operator std::basic_ostream< char > & ()
 Cast to ostream. More...
 
const std::basic_string< char > & str (std::basic_ostream< char > &os)
 Get content of buffer. More...
 
const std::basic_string< char > & str (CharMessageBuffer &buf)
 Get content of buffer. More...
 
bool hasStream () const
 Returns true if buffer has an encapsulated STL stream. More...
 

Detailed Description

This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the message parameter.

The class is not intended for use outside of that context.

Constructor & Destructor Documentation

§ CharMessageBuffer()

Creates a new instance.

§ ~CharMessageBuffer()

Destructor.

Member Function Documentation

§ hasStream()

bool hasStream ( ) const

Returns true if buffer has an encapsulated STL stream.

Returns
true if STL stream was created.

§ operator std::basic_ostream< char > &()

operator std::basic_ostream< char > & ( )

Cast to ostream.

§ operator<<() [1/15]

CharMessageBuffer& operator<< ( const std::basic_string< char > &  msg)

Appends string to buffer.

Parameters
msgstring append.
Returns
this buffer.

§ operator<<() [2/15]

CharMessageBuffer& operator<< ( const char *  msg)

Appends string to buffer.

Parameters
msgstring to append.
Returns
this buffer.

§ operator<<() [3/15]

CharMessageBuffer& operator<< ( char *  msg)

Appends string to buffer.

Parameters
msgstring to append.
Returns
this buffer.

§ operator<<() [4/15]

CharMessageBuffer& operator<< ( const char  msg)

Appends character to buffer.

Parameters
msgcharacter to append.
Returns
this buffer.

§ operator<<() [5/15]

std::ostream& operator<< ( ios_base_manip  manip)

Insertion operator for STL manipulators such as std::fixed.

Parameters
manipmanipulator.
Returns
encapsulated STL stream.

§ operator<<() [6/15]

std::ostream& operator<< ( bool  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

§ operator<<() [7/15]

std::ostream& operator<< ( short  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

§ operator<<() [8/15]

std::ostream& operator<< ( int  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

§ operator<<() [9/15]

std::ostream& operator<< ( unsigned int  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

§ operator<<() [10/15]

std::ostream& operator<< ( long  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

§ operator<<() [11/15]

std::ostream& operator<< ( unsigned long  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

§ operator<<() [12/15]

std::ostream& operator<< ( float  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

§ operator<<() [13/15]

std::ostream& operator<< ( double  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

§ operator<<() [14/15]

std::ostream& operator<< ( long double  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

§ operator<<() [15/15]

std::ostream& operator<< ( void *  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

§ str() [1/2]

const std::basic_string<char>& str ( std::basic_ostream< char > &  os)

Get content of buffer.

Parameters
osused only to signal that the embedded stream was used.

§ str() [2/2]

const std::basic_string<char>& str ( CharMessageBuffer buf)

Get content of buffer.

Parameters
bufused only to signal that the embedded stream was not used.

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