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&);
77#if LOG4CXX_CFSTRING_API
158 operator std::basic_ostream<char>& ();
165 std::basic_string<char>
extract_str(std::basic_ostream<char>& os);
179 const std::basic_string<char>&
str(std::basic_ostream<char>& os);
204 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(CharMessageBufferPrivate, m_priv)
210 return ((std::basic_ostream<char>&) os) << val;
213#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR
260#if LOG4CXX_CFSTRING_API
388 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(UniCharMessageBufferPrivate, m_priv)
398#if LOG4CXX_WCHAR_T_API
448 std::basic_ostream<wchar_t>&
operator<<(ios_base_manip manip);
454 std::basic_ostream<wchar_t>&
operator<<(
bool val);
461 std::basic_ostream<wchar_t>&
operator<<(
short val);
467 std::basic_ostream<wchar_t>&
operator<<(
int val);
473 std::basic_ostream<wchar_t>&
operator<<(
unsigned int val);
479 std::basic_ostream<wchar_t>&
operator<<(
long val);
485 std::basic_ostream<wchar_t>&
operator<<(
unsigned long val);
491 std::basic_ostream<wchar_t>&
operator<<(
float val);
497 std::basic_ostream<wchar_t>&
operator<<(
double val);
503 std::basic_ostream<wchar_t>&
operator<<(
long double val);
509 std::basic_ostream<wchar_t>&
operator<<(
void* val);
515 operator std::basic_ostream<wchar_t>& ();
522 std::basic_string<wchar_t>
extract_str(std::basic_ostream<wchar_t>& os);
536 const std::basic_string<wchar_t>&
str(std::basic_ostream<wchar_t>& os);
561 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(WideMessageBufferPrivate, m_priv)
567 return ((std::basic_ostream<wchar_t>&) os) << val;
590 operator std::ostream& ();
652 const std::string&
str(std::ostream& os);
683#if LOG4CXX_UNICHAR_API
725 std::basic_string<UniChar>
extract_str(std::basic_ostream<UniChar>& os);
728#if LOG4CXX_UNICHAR_API && LOG4CXX_CFSTRING_API
737#elif LOG4CXX_CFSTRING_API
845 const std::wstring&
str(std::basic_ostream<wchar_t>& os);
847#if LOG4CXX_UNICHAR_API
881 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(MessageBufferPrivate, m_priv)
887 return ((std::ostream&) os) << val;
890#if LOG4CXX_LOGCHAR_IS_UTF8
891 typedef CharMessageBuffer LogCharMessageBuffer;
894#if LOG4CXX_LOGCHAR_IS_WCHAR
895 typedef WideMessageBuffer LogCharMessageBuffer;
898#if LOG4CXX_LOGCHAR_IS_UNICHAR
899 typedef UniCharMessageBuffer LogCharMessageBuffer;
903typedef CharMessageBuffer MessageBuffer;
904typedef CharMessageBuffer LogCharMessageBuffer;
This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the messa...
Definition: log4cxx/helpers/messagebuffer.h:40
CharMessageBuffer & operator<<(char *msg)
Appends string to buffer.
CharMessageBuffer & operator<<(const CFStringRef &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.
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::basic_string< char > extract_str(CharMessageBuffer &buf)
Remove the constructed string.
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::basic_string< char > extract_str(std::basic_ostream< char > &os)
Remove the constructed string.
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: log4cxx/helpers/messagebuffer.h:576
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.
std::string extract_str(CharMessageBuffer &buf)
Remove the constructed string.
std::wstring extract_str(std::basic_ostream< wchar_t > &os)
Remove the constructed string.
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::basic_string< UniChar > extract_str(std::basic_ostream< UniChar > &os)
Remove the constructed string.
std::wstring extract_str(WideMessageBuffer &buf)
Remove the constructed string.
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.
std::string extract_str(std::ostream &os)
Remove the constructed string.
std::basic_string< UniChar > extract_str(UniCharMessageBuffer &buf)
Remove the constructed string.
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: log4cxx/helpers/messagebuffer.h:220
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: log4cxx/helpers/messagebuffer.h:231
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.
std::basic_string< UniChar > extract_str(UniCharMessageBuffer &buf)
Remove the constructed string.
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.
std::basic_string< UniChar > extract_str(uostream &os)
Remove the constructed string.
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: log4cxx/helpers/messagebuffer.h:405
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.
std::basic_string< wchar_t > extract_str(std::basic_ostream< wchar_t > &os)
Remove the constructed string.
std::basic_string< wchar_t > extract_str(WideMessageBuffer &buf)
Remove the constructed string.
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.
log4cxx::helpers::UniCharMessageBuffer & operator<<(log4cxx::helpers::UniCharMessageBuffer &mb, const QString &msg)
Definition: log4cxx-qt/messagebuffer.h:24
const struct __CFString * CFStringRef
Definition: logstring.h:30
unsigned short UniChar
Definition: logstring.h:38