18#ifndef _LOG4CXX_MESSAGE_BUFFER_H
19#define _LOG4CXX_MESSAGE_BUFFER_H
21#include <log4cxx/log4cxx.h>
32typedef std::ios_base& (*ios_base_manip)(std::ios_base&);
149 operator std::basic_ostream<char>& ();
156 const std::basic_string<char>&
str(std::basic_ostream<char>& os);
181 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(CharMessageBufferPrivate, m_priv)
187 return ((std::basic_ostream<char>&) os) << val;
190#if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API || LOG4CXX_LOGCHAR_IS_UNICHAR
237#if LOG4CXX_CFSTRING_API
351 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(UniCharMessageBufferPrivate, m_priv)
361#if LOG4CXX_WCHAR_T_API
411 std::basic_ostream<wchar_t>&
operator<<(ios_base_manip manip);
417 std::basic_ostream<wchar_t>&
operator<<(
bool val);
424 std::basic_ostream<wchar_t>&
operator<<(
short val);
430 std::basic_ostream<wchar_t>&
operator<<(
int val);
436 std::basic_ostream<wchar_t>&
operator<<(
unsigned int val);
442 std::basic_ostream<wchar_t>&
operator<<(
long val);
448 std::basic_ostream<wchar_t>&
operator<<(
unsigned long val);
454 std::basic_ostream<wchar_t>&
operator<<(
float val);
460 std::basic_ostream<wchar_t>&
operator<<(
double val);
466 std::basic_ostream<wchar_t>&
operator<<(
long double val);
472 std::basic_ostream<wchar_t>&
operator<<(
void* val);
478 operator std::basic_ostream<wchar_t>& ();
485 const std::basic_string<wchar_t>&
str(std::basic_ostream<wchar_t>& os);
510 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(WideMessageBufferPrivate, m_priv)
516 return ((std::basic_ostream<wchar_t>&) os) << val;
539 operator std::ostream& ();
585 const std::string&
str(std::ostream& os);
616#if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API
647#if LOG4CXX_CFSTRING_API
739 const std::wstring&
str(std::basic_ostream<wchar_t>& os);
741#if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API
775 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(MessageBufferPrivate, m_priv)
781 return ((std::ostream&) os) << val;
784#if LOG4CXX_LOGCHAR_IS_UTF8
785 typedef CharMessageBuffer LogCharMessageBuffer;
788#if LOG4CXX_LOGCHAR_IS_WCHAR
789 typedef WideMessageBuffer LogCharMessageBuffer;
792#if LOG4CXX_LOGCHAR_IS_UNICHAR
793 typedef UniCharMessageBuffer LogCharMessageBuffer;
797typedef CharMessageBuffer MessageBuffer;
798typedef CharMessageBuffer LogCharMessageBuffer;
This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the messa...
Definition: messagebuffer.h:40
CharMessageBuffer & operator<<(char *msg)
Appends string to buffer.
std::ostream & operator<<(short val)
Insertion operator for built-in type.
std::ostream & operator<<(bool val)
Insertion operator for built-in type.
bool hasStream() const
Returns true if buffer has an encapsulated STL stream.
CharMessageBuffer & operator<<(const std::basic_string< char > &msg)
Appends string to buffer.
CharMessageBuffer()
Creates a new instance.
std::ostream & operator<<(float val)
Insertion operator for built-in type.
CharMessageBuffer & operator<<(const char *msg)
Appends string to buffer.
std::ostream & operator<<(ios_base_manip manip)
Insertion operator for STL manipulators such as std::fixed.
std::ostream & operator<<(long double val)
Insertion operator for built-in type.
std::ostream & operator<<(double val)
Insertion operator for built-in type.
CharMessageBuffer & operator<<(const char msg)
Appends character to buffer.
std::ostream & operator<<(unsigned long val)
Insertion operator for built-in type.
std::ostream & operator<<(int val)
Insertion operator for built-in type.
const std::basic_string< char > & str(CharMessageBuffer &buf)
Get content of buffer.
std::ostream & operator<<(long val)
Insertion operator for built-in type.
std::ostream & operator<<(void *val)
Insertion operator for built-in type.
std::ostream & operator<<(unsigned int val)
Insertion operator for built-in type.
~CharMessageBuffer()
Destructor.
const std::basic_string< char > & str(std::basic_ostream< char > &os)
Get content of buffer.
This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the messa...
Definition: messagebuffer.h:525
const std::wstring & str(WideMessageBuffer &buf)
Get content of buffer.
WideMessageBuffer & operator<<(const wchar_t *msg)
Appends a string into the buffer and fixes the buffer to use char characters.
WideMessageBuffer & operator<<(wchar_t *msg)
Appends a string into the buffer and fixes the buffer to use char characters.
std::ostream & operator<<(short val)
Insertion operator for built-in type.
UniCharMessageBuffer & operator<<(const UniChar *msg)
Appends a string into the buffer and fixes the buffer to use char characters.
bool hasStream() const
Returns true if buffer has an encapsulated STL stream.
WideMessageBuffer & operator<<(const wchar_t msg)
Appends a string into the buffer and fixes the buffer to use char characters.
CharMessageBuffer & operator<<(const char *msg)
Appends a string into the buffer and fixes the buffer to use char characters.
std::ostream & operator<<(float val)
Insertion operator for built-in type.
WideMessageBuffer & operator<<(const std::wstring &msg)
Appends a string into the buffer and fixes the buffer to use char characters.
std::ostream & operator<<(unsigned long val)
Insertion operator for built-in type.
UniCharMessageBuffer & operator<<(UniChar *msg)
Appends a string into the buffer and fixes the buffer to use char characters.
std::ostream & operator<<(long val)
Insertion operator for built-in type.
std::ostream & operator<<(unsigned int val)
Insertion operator for built-in type.
UniCharMessageBuffer & operator<<(const UniChar msg)
Appends a string into the buffer and fixes the buffer to use char characters.
CharMessageBuffer & operator<<(char *msg)
Appends a string into the buffer and fixes the buffer to use char characters.
const std::basic_string< UniChar > & str(UniCharMessageBuffer &buf)
Get content of buffer.
std::ostream & operator<<(double val)
Insertion operator for built-in type.
std::ostream & operator<<(long double val)
Insertion operator for built-in type.
MessageBuffer()
Creates a new instance.
std::ostream & operator<<(int val)
Insertion operator for built-in type.
std::ostream & operator<<(bool val)
Insertion operator for built-in type.
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
const std::string & str(std::ostream &os)
Get content of buffer.
std::ostream & operator<<(ios_base_manip manip)
Insertion operator for STL manipulators such as std::fixed.
UniCharMessageBuffer & operator<<(const CFStringRef &msg)
Appends a string into the buffer and fixes the buffer to use char characters.
~MessageBuffer()
Destructor.
std::ostream & operator<<(void *val)
Insertion operator for built-in type.
UniCharMessageBuffer & operator<<(const std::basic_string< UniChar > &msg)
Appends a string into the buffer and fixes the buffer to use char characters.
const std::wstring & str(std::basic_ostream< wchar_t > &os)
Get content of buffer.
CharMessageBuffer & operator<<(const std::string &msg)
Appends a string into the buffer and fixes the buffer to use char characters.
CharMessageBuffer & operator<<(const char msg)
Appends a string into the buffer and fixes the buffer to use char characters.
const std::basic_string< UniChar > & str(UniCharMessageBuffer::uostream &os)
Get content of buffer.
This class is designed to support insertion operations in the message argument to the LOG4CXX_INFO an...
Definition: messagebuffer.h:197
const std::basic_string< UniChar > & str(uostream &os)
Get content of buffer.
uostream & operator<<(long val)
Insertion operator for built-in type.
std::basic_ostream< UniChar > uostream
Definition: messagebuffer.h:208
uostream & operator<<(float val)
Insertion operator for built-in type.
UniCharMessageBuffer()
Creates a new instance.
uostream & operator<<(ios_base_manip manip)
Insertion operator for STL manipulators such as std::fixed.
UniCharMessageBuffer & operator<<(const std::basic_string< UniChar > &msg)
Appends string to buffer.
UniCharMessageBuffer & operator<<(const CFStringRef &msg)
Appends a string into the buffer and fixes the buffer to use char characters.
uostream & operator<<(int val)
Insertion operator for built-in type.
uostream & operator<<(unsigned int val)
Insertion operator for built-in type.
uostream & operator<<(bool val)
Insertion operator for built-in type.
uostream & operator<<(unsigned long val)
Insertion operator for built-in type.
UniCharMessageBuffer & operator<<(UniChar *msg)
Appends string to buffer.
UniCharMessageBuffer & operator<<(const UniChar msg)
Appends character to buffer.
uostream & operator<<(void *val)
Insertion operator for built-in type.
uostream & operator<<(short val)
Insertion operator for built-in type.
bool hasStream() const
Returns true if buffer has an encapsulated STL stream.
~UniCharMessageBuffer()
Destructor.
UniCharMessageBuffer & operator<<(const UniChar *msg)
Appends string to buffer.
uostream & operator<<(long double val)
Insertion operator for built-in type.
const std::basic_string< UniChar > & str(UniCharMessageBuffer &buf)
Get content of buffer.
uostream & operator<<(double val)
Insertion operator for built-in type.
This class is designed to support insertion operations in the message argument to the LOG4CXX_INFO an...
Definition: messagebuffer.h:368
WideMessageBuffer & operator<<(const wchar_t *msg)
Appends string to buffer.
WideMessageBuffer()
Creates a new instance.
const std::basic_string< wchar_t > & str(WideMessageBuffer &buf)
Get content of buffer.
bool hasStream() const
Returns true if buffer has an encapsulated STL stream.
~WideMessageBuffer()
Destructor.
WideMessageBuffer & operator<<(const wchar_t msg)
Appends character to buffer.
WideMessageBuffer & operator<<(const std::basic_string< wchar_t > &msg)
Appends string to buffer.
WideMessageBuffer & operator<<(wchar_t *msg)
Appends string to buffer.
const std::basic_string< wchar_t > & str(std::basic_ostream< wchar_t > &os)
Get content of buffer.
const struct __CFString * CFStringRef
Definition: logstring.h:30
std::basic_ostream< char > & operator<<(CharMessageBuffer &os, const V &val)
Definition: messagebuffer.h:185
Definition: configuration.h:25
unsigned short UniChar
Definition: logstring.h:38