MessageBuffer Class Reference

List of all members.

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.


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.


Constructor & Destructor Documentation

MessageBuffer  ) 
 

Creates a new instance.

~MessageBuffer  ) 
 

Destructor.


Member Function Documentation

bool hasStream  )  const
 

Returns true if buffer has an encapsulated STL stream.

Returns:
true if STL stream was created.

operator std::ostream &  ) 
 

Cast to ostream.

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

Insertion operator for built-in type.

Parameters:
val build in type.
Returns:
encapsulated STL stream.

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

Insertion operator for built-in type.

Parameters:
val build in type.
Returns:
encapsulated STL stream.

std::ostream& operator<< double  val  ) 
 

Insertion operator for built-in type.

Parameters:
val build in type.
Returns:
encapsulated STL stream.

std::ostream& operator<< float  val  ) 
 

Insertion operator for built-in type.

Parameters:
val build in type.
Returns:
encapsulated STL stream.

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

Insertion operator for built-in type.

Parameters:
val build in type.
Returns:
encapsulated STL stream.

std::ostream& operator<< long  val  ) 
 

Insertion operator for built-in type.

Parameters:
val build in type.
Returns:
encapsulated STL stream.

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

Insertion operator for built-in type.

Parameters:
val build in type.
Returns:
encapsulated STL stream.

std::ostream& operator<< int  val  ) 
 

Insertion operator for built-in type.

Parameters:
val build in type.
Returns:
encapsulated STL stream.

std::ostream& operator<< short  val  ) 
 

Insertion operator for built-in type.

Parameters:
val build in type.
Returns:
encapsulated STL stream.

std::ostream& operator<< bool  val  ) 
 

Insertion operator for built-in type.

Parameters:
val build in type.
Returns:
encapsulated STL stream.

std::ostream& operator<< ios_base_manip  manip  ) 
 

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

Parameters:
manip manipulator.
Returns:
encapsulated STL stream.

UniCharMessageBuffer& operator<< const CFStringRef msg  ) 
 

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

Parameters:
msg message to append.
Returns:
encapsulated CharMessageBuffer.

UniCharMessageBuffer& operator<< const UniChar  msg  ) 
 

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

Parameters:
msg message to append.
Returns:
encapsulated CharMessageBuffer.

UniCharMessageBuffer& operator<< UniChar msg  ) 
 

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

Parameters:
msg message to append.
Returns:
encapsulated CharMessageBuffer.

UniCharMessageBuffer& operator<< const UniChar msg  ) 
 

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

Parameters:
msg message to append.
Returns:
encapsulated CharMessageBuffer.

UniCharMessageBuffer& operator<< const std::basic_string< UniChar > &  msg  ) 
 

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

Parameters:
msg message to append.
Returns:
encapsulated CharMessageBuffer.

WideMessageBuffer& operator<< const wchar_t  msg  ) 
 

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

Parameters:
msg message to append.
Returns:
encapsulated CharMessageBuffer.

WideMessageBuffer& operator<< wchar_t *  msg  ) 
 

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

Parameters:
msg message to append.
Returns:
encapsulated CharMessageBuffer.

WideMessageBuffer& operator<< const wchar_t *  msg  ) 
 

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

Parameters:
msg message to append.
Returns:
encapsulated CharMessageBuffer.

WideMessageBuffer& operator<< const std::wstring &  msg  ) 
 

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

Parameters:
msg message to append.
Returns:
encapsulated CharMessageBuffer.

CharMessageBuffer& operator<< const char  msg  ) 
 

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

Parameters:
msg message to append.
Returns:
encapsulated CharMessageBuffer.

CharMessageBuffer& operator<< char *  msg  ) 
 

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

Parameters:
msg message to append.
Returns:
encapsulated CharMessageBuffer.

CharMessageBuffer& operator<< const char *  msg  ) 
 

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

Parameters:
msg message to append.
Returns:
encapsulated CharMessageBuffer.

CharMessageBuffer& operator<< const std::string &  msg  ) 
 

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

Parameters:
msg message to append.
Returns:
encapsulated CharMessageBuffer.

const std::basic_string<UniChar>& str UniCharMessageBuffer::uostream os  ) 
 

Get content of buffer.

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

const std::basic_string<UniChar>& str UniCharMessageBuffer buf  ) 
 

Get content of buffer.

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

const std::wstring& str std::basic_ostream< wchar_t > &  os  ) 
 

Get content of buffer.

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

const std::wstring& str WideMessageBuffer buf  ) 
 

Get content of buffer.

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

const std::string& str std::ostream &  os  ) 
 

Get content of buffer.

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

const std::string& str CharMessageBuffer buf  ) 
 

Get content of buffer.

Parameters:
buf used 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: