Apache Log4cxx Version 1.1.0
Loading...
Searching...
No Matches
log4cxx::helpers::MessageBuffer Class Reference

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

#include <messagebuffer.h>

Public Member Functions

 MessageBuffer ()
 Creates a new instance.
 
 ~MessageBuffer ()
 Destructor.
 
 operator std::ostream & ()
 Cast to ostream.
 
CharMessageBufferoperator<< (const std::string &msg)
 Appends a string into the buffer and fixes the buffer to use char characters.
 
CharMessageBufferoperator<< (const char *msg)
 Appends a string into the buffer and fixes the buffer to use char characters.
 
CharMessageBufferoperator<< (char *msg)
 Appends a string into the buffer and fixes the buffer to use char characters.
 
CharMessageBufferoperator<< (const char msg)
 Appends a string into the buffer and fixes the buffer to use char characters.
 
const std::string & str (CharMessageBuffer &buf)
 Get content of buffer.
 
const std::string & str (std::ostream &os)
 Get content of buffer.
 
WideMessageBufferoperator<< (const std::wstring &msg)
 Appends a string into the buffer and fixes the buffer to use char characters.
 
WideMessageBufferoperator<< (const wchar_t *msg)
 Appends a string into the buffer and fixes the buffer to use char characters.
 
WideMessageBufferoperator<< (wchar_t *msg)
 Appends a string into the buffer and fixes the buffer to use char characters.
 
WideMessageBufferoperator<< (const wchar_t msg)
 Appends a string into the buffer and fixes the buffer to use char characters.
 
UniCharMessageBufferoperator<< (const std::basic_string< UniChar > &msg)
 Appends a string into the buffer and fixes the buffer to use char characters.
 
UniCharMessageBufferoperator<< (const UniChar *msg)
 Appends a string into the buffer and fixes the buffer to use char characters.
 
UniCharMessageBufferoperator<< (UniChar *msg)
 Appends a string into the buffer and fixes the buffer to use char characters.
 
UniCharMessageBufferoperator<< (const UniChar msg)
 Appends a string into the buffer and fixes the buffer to use char characters.
 
UniCharMessageBufferoperator<< (const CFStringRef &msg)
 Appends a string into the buffer and fixes the buffer to use char characters.
 
std::ostream & operator<< (ios_base_manip manip)
 Insertion operator for STL manipulators such as std::fixed.
 
std::ostream & operator<< (bool val)
 Insertion operator for built-in type.
 
std::ostream & operator<< (short val)
 Insertion operator for built-in type.
 
std::ostream & operator<< (int val)
 Insertion operator for built-in type.
 
std::ostream & operator<< (unsigned int val)
 Insertion operator for built-in type.
 
std::ostream & operator<< (long val)
 Insertion operator for built-in type.
 
std::ostream & operator<< (unsigned long val)
 Insertion operator for built-in type.
 
std::ostream & operator<< (float val)
 Insertion operator for built-in type.
 
std::ostream & operator<< (double val)
 Insertion operator for built-in type.
 
std::ostream & operator<< (long double val)
 Insertion operator for built-in type.
 
std::ostream & operator<< (void *val)
 Insertion operator for built-in type.
 
const std::wstring & str (WideMessageBuffer &buf)
 Get content of buffer.
 
const std::wstring & str (std::basic_ostream< wchar_t > &os)
 Get content of buffer.
 
const std::basic_string< UniChar > & str (UniCharMessageBuffer &buf)
 Get content of buffer.
 
const std::basic_string< UniChar > & str (UniCharMessageBuffer::uostream &os)
 Get content of buffer.
 
bool hasStream () const
 Returns true if buffer has an encapsulated STL stream.
 

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

◆ MessageBuffer()

log4cxx::helpers::MessageBuffer::MessageBuffer ( )

Creates a new instance.

◆ ~MessageBuffer()

log4cxx::helpers::MessageBuffer::~MessageBuffer ( )

Destructor.

Member Function Documentation

◆ hasStream()

bool log4cxx::helpers::MessageBuffer::hasStream ( ) const

Returns true if buffer has an encapsulated STL stream.

Returns
true if STL stream was created.

◆ operator std::ostream &()

log4cxx::helpers::MessageBuffer::operator std::ostream & ( )

Cast to ostream.

◆ operator<<() [1/24]

std::ostream & log4cxx::helpers::MessageBuffer::operator<< ( bool  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

◆ operator<<() [2/24]

CharMessageBuffer & log4cxx::helpers::MessageBuffer::operator<< ( char *  msg)

Appends a string into the buffer and fixes the buffer to use char characters.

Parameters
msgmessage to append.
Returns
encapsulated CharMessageBuffer.

◆ operator<<() [3/24]

UniCharMessageBuffer & log4cxx::helpers::MessageBuffer::operator<< ( const CFStringRef msg)

Appends a string into the buffer and fixes the buffer to use char characters.

Parameters
msgmessage to append.
Returns
encapsulated CharMessageBuffer.

◆ operator<<() [4/24]

CharMessageBuffer & log4cxx::helpers::MessageBuffer::operator<< ( const char *  msg)

Appends a string into the buffer and fixes the buffer to use char characters.

Parameters
msgmessage to append.
Returns
encapsulated CharMessageBuffer.

◆ operator<<() [5/24]

CharMessageBuffer & log4cxx::helpers::MessageBuffer::operator<< ( const char  msg)

Appends a string into the buffer and fixes the buffer to use char characters.

Parameters
msgmessage to append.
Returns
encapsulated CharMessageBuffer.

◆ operator<<() [6/24]

UniCharMessageBuffer & log4cxx::helpers::MessageBuffer::operator<< ( const std::basic_string< UniChar > &  msg)

Appends a string into the buffer and fixes the buffer to use char characters.

Parameters
msgmessage to append.
Returns
encapsulated CharMessageBuffer.

◆ operator<<() [7/24]

CharMessageBuffer & log4cxx::helpers::MessageBuffer::operator<< ( const std::string &  msg)

Appends a string into the buffer and fixes the buffer to use char characters.

Parameters
msgmessage to append.
Returns
encapsulated CharMessageBuffer.

◆ operator<<() [8/24]

WideMessageBuffer & log4cxx::helpers::MessageBuffer::operator<< ( const std::wstring &  msg)

Appends a string into the buffer and fixes the buffer to use char characters.

Parameters
msgmessage to append.
Returns
encapsulated CharMessageBuffer.

◆ operator<<() [9/24]

UniCharMessageBuffer & log4cxx::helpers::MessageBuffer::operator<< ( const UniChar msg)

Appends a string into the buffer and fixes the buffer to use char characters.

Parameters
msgmessage to append.
Returns
encapsulated CharMessageBuffer.

◆ operator<<() [10/24]

UniCharMessageBuffer & log4cxx::helpers::MessageBuffer::operator<< ( const UniChar  msg)

Appends a string into the buffer and fixes the buffer to use char characters.

Parameters
msgmessage to append.
Returns
encapsulated CharMessageBuffer.

◆ operator<<() [11/24]

WideMessageBuffer & log4cxx::helpers::MessageBuffer::operator<< ( const wchar_t *  msg)

Appends a string into the buffer and fixes the buffer to use char characters.

Parameters
msgmessage to append.
Returns
encapsulated CharMessageBuffer.

◆ operator<<() [12/24]

WideMessageBuffer & log4cxx::helpers::MessageBuffer::operator<< ( const wchar_t  msg)

Appends a string into the buffer and fixes the buffer to use char characters.

Parameters
msgmessage to append.
Returns
encapsulated CharMessageBuffer.

◆ operator<<() [13/24]

std::ostream & log4cxx::helpers::MessageBuffer::operator<< ( double  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

◆ operator<<() [14/24]

std::ostream & log4cxx::helpers::MessageBuffer::operator<< ( float  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

◆ operator<<() [15/24]

std::ostream & log4cxx::helpers::MessageBuffer::operator<< ( int  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

◆ operator<<() [16/24]

std::ostream & log4cxx::helpers::MessageBuffer::operator<< ( ios_base_manip  manip)

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

Parameters
manipmanipulator.
Returns
encapsulated STL stream.

◆ operator<<() [17/24]

std::ostream & log4cxx::helpers::MessageBuffer::operator<< ( long double  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

◆ operator<<() [18/24]

std::ostream & log4cxx::helpers::MessageBuffer::operator<< ( long  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

◆ operator<<() [19/24]

std::ostream & log4cxx::helpers::MessageBuffer::operator<< ( short  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

◆ operator<<() [20/24]

UniCharMessageBuffer & log4cxx::helpers::MessageBuffer::operator<< ( UniChar msg)

Appends a string into the buffer and fixes the buffer to use char characters.

Parameters
msgmessage to append.
Returns
encapsulated CharMessageBuffer.

◆ operator<<() [21/24]

std::ostream & log4cxx::helpers::MessageBuffer::operator<< ( unsigned int  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

◆ operator<<() [22/24]

std::ostream & log4cxx::helpers::MessageBuffer::operator<< ( unsigned long  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

◆ operator<<() [23/24]

std::ostream & log4cxx::helpers::MessageBuffer::operator<< ( void *  val)

Insertion operator for built-in type.

Parameters
valbuild in type.
Returns
encapsulated STL stream.

◆ operator<<() [24/24]

WideMessageBuffer & log4cxx::helpers::MessageBuffer::operator<< ( wchar_t *  msg)

Appends a string into the buffer and fixes the buffer to use char characters.

Parameters
msgmessage to append.
Returns
encapsulated CharMessageBuffer.

◆ str() [1/6]

const std::string & log4cxx::helpers::MessageBuffer::str ( CharMessageBuffer buf)

Get content of buffer.

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

◆ str() [2/6]

const std::wstring & log4cxx::helpers::MessageBuffer::str ( std::basic_ostream< wchar_t > &  os)

Get content of buffer.

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

◆ str() [3/6]

const std::string & log4cxx::helpers::MessageBuffer::str ( std::ostream &  os)

Get content of buffer.

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

◆ str() [4/6]

const std::basic_string< UniChar > & log4cxx::helpers::MessageBuffer::str ( UniCharMessageBuffer buf)

Get content of buffer.

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

◆ str() [5/6]

const std::basic_string< UniChar > & log4cxx::helpers::MessageBuffer::str ( UniCharMessageBuffer::uostream os)

Get content of buffer.

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

◆ str() [6/6]

const std::wstring & log4cxx::helpers::MessageBuffer::str ( WideMessageBuffer buf)

Get content of buffer.

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

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