|
| basic_formatting_ostream () |
| Default constructor. More...
|
|
| basic_formatting_ostream (string_type &str) |
| Initializing constructor. More...
|
|
| ~basic_formatting_ostream () |
| Destructor. More...
|
|
void | attach (string_type &str) |
| Attaches the stream to the string. More...
|
|
void | detach () |
| Detaches the stream from the string. More...
|
|
string_type const & | str () const |
|
ostream_type & | stream () |
|
ostream_type const & | stream () const |
|
fmtflags | flags () const |
|
fmtflags | flags (fmtflags f) |
|
fmtflags | setf (fmtflags f) |
|
fmtflags | setf (fmtflags f, fmtflags mask) |
|
void | unsetf (fmtflags f) |
|
std::streamsize | precision () const |
|
std::streamsize | precision (std::streamsize p) |
|
std::streamsize | width () const |
|
std::streamsize | width (std::streamsize w) |
|
std::locale | getloc () const |
|
std::locale | imbue (std::locale const &loc) |
|
long & | iword (int index) |
|
void *& | pword (int index) |
|
void | register_callback (event_callback fn, int index) |
|
bool | operator! () const |
|
iostate | rdstate () const |
|
void | clear (iostate state=goodbit) |
|
void | setstate (iostate state) |
|
bool | good () const |
|
bool | eof () const |
|
bool | fail () const |
|
bool | bad () const |
|
iostate | exceptions () const |
|
void | exceptions (iostate s) |
|
ostream_type * | tie () const |
|
ostream_type * | tie (ostream_type *strm) |
|
streambuf_type * | rdbuf () const |
|
basic_formatting_ostream & | copyfmt (std::basic_ios< char_type, traits_type > &rhs) |
|
basic_formatting_ostream & | copyfmt (basic_formatting_ostream &rhs) |
|
char_type | fill () const |
|
char_type | fill (char_type ch) |
|
char | narrow (char_type ch, char def) const |
|
char_type | widen (char ch) const |
|
basic_formatting_ostream & | flush () |
|
pos_type | tellp () |
|
basic_formatting_ostream & | seekp (pos_type pos) |
|
basic_formatting_ostream & | seekp (off_type off, std::ios_base::seekdir dir) |
|
basic_formatting_ostream & | put (char_type c) |
|
template<typename OtherCharT > |
aux::enable_if_char_type
< OtherCharT,
basic_formatting_ostream & >
::type | put (OtherCharT c) |
|
basic_formatting_ostream & | write (const char_type *p, std::streamsize size) |
|
template<typename OtherCharT > |
aux::enable_if_char_type
< OtherCharT,
basic_formatting_ostream & >
::type | write (const OtherCharT *p, std::streamsize size) |
|
basic_formatting_ostream & | operator<< (ios_base_manip manip) |
|
basic_formatting_ostream & | operator<< (basic_ios_manip manip) |
|
basic_formatting_ostream & | operator<< (stream_manip manip) |
|
basic_formatting_ostream & | operator<< (char c) |
|
basic_formatting_ostream & | operator<< (const char *p) |
|
basic_formatting_ostream & | operator<< (wchar_t c) |
|
basic_formatting_ostream & | operator<< (const wchar_t *p) |
|
basic_formatting_ostream & | operator<< (char16_t c) |
|
basic_formatting_ostream & | operator<< (const char16_t *p) |
|
basic_formatting_ostream & | operator<< (char32_t c) |
|
basic_formatting_ostream & | operator<< (const char32_t *p) |
|
basic_formatting_ostream & | operator<< (bool value) |
|
basic_formatting_ostream & | operator<< (signed char value) |
|
basic_formatting_ostream & | operator<< (unsigned char value) |
|
basic_formatting_ostream & | operator<< (short value) |
|
basic_formatting_ostream & | operator<< (unsigned short value) |
|
basic_formatting_ostream & | operator<< (int value) |
|
basic_formatting_ostream & | operator<< (unsigned int value) |
|
basic_formatting_ostream & | operator<< (long value) |
|
basic_formatting_ostream & | operator<< (unsigned long value) |
|
basic_formatting_ostream & | operator<< (long long value) |
|
basic_formatting_ostream & | operator<< (unsigned long long value) |
|
basic_formatting_ostream & | operator<< (float value) |
|
basic_formatting_ostream & | operator<< (double value) |
|
basic_formatting_ostream & | operator<< (long double value) |
|
basic_formatting_ostream & | operator<< (const void *value) |
|
basic_formatting_ostream & | operator<< (std::basic_streambuf< char_type, traits_type > *buf) |
|
|
template<typename OtherCharT , typename OtherTraitsT , typename OtherAllocatorT > |
aux::enable_if_char_type
< OtherCharT,
basic_formatting_ostream & >
::type | operator<< (basic_formatting_ostream &strm, std::basic_string< OtherCharT, OtherTraitsT, OtherAllocatorT > const &str) |
|
template<typename OtherCharT , typename OtherTraitsT > |
aux::enable_if_char_type
< OtherCharT,
basic_formatting_ostream & >
::type | operator<< (basic_formatting_ostream &strm, basic_string_literal< OtherCharT, OtherTraitsT > const &str) |
|
template<typename OtherCharT , typename OtherTraitsT > |
aux::enable_if_char_type
< OtherCharT,
basic_formatting_ostream & >
::type | operator<< (basic_formatting_ostream &strm, basic_string_ref< OtherCharT, OtherTraitsT > const &str) |
|
template<typename CharT, typename TraitsT, typename AllocatorT>
singleton boost::basic_formatting_ostream< CharT, TraitsT, AllocatorT >
Stream wrapper for log records formatting.
Stream for log records formatting.
This stream wrapper is used by the library for log record formatting. It implements the standard string stream interface with a few differences:
- It does not derive from standard types
std::basic_ostream
, std::basic_ios
and std::ios_base
, although it tries to implement their interfaces closely. There are a few small differences, mostly regarding rdbuf
and str
signatures, as well as the supported insertion operator overloads. The actual wrapped stream can be accessed through the stream
methods.
- By default,
bool
values are formatted using alphabetical representation rather than numeric.
- The stream supports writing strings of character types different from the stream character type. The stream will perform character code conversion as needed using the imbued locale.
- The stream operates on an external string object rather than on the embedded one. The string can be attached or detached from the stream dynamically.
Although basic_formatting_ostream
does not derive from std::basic_ostream
, users are not required to add special overloads of operator<<
for it since the stream will by default reuse the operators for std::basic_ostream
. However, one can define special overloads of operator<<
for basic_formatting_ostream
if a certain type needs special formatting when output to log.