Inheritance diagram for std::basic_ostream< _CharT, _Traits >:
Public Types | |
typedef _CharT | char_type |
typedef _Traits::int_type | int_type |
typedef _Traits::pos_type | pos_type |
typedef _Traits::off_type | off_type |
typedef _Traits | traits_type |
typedef basic_streambuf< _CharT, _Traits > | __streambuf_type |
typedef basic_ios< _CharT, _Traits > | __ios_type |
typedef basic_ostream< _CharT, _Traits > | __ostream_type |
typedef num_put< _CharT, ostreambuf_iterator< _CharT, _Traits > > | __num_put_type |
typedef ctype< _CharT > | __ctype_type |
Public Member Functions | |
basic_ostream (__streambuf_type *__sb) | |
Base constructor. | |
virtual | ~basic_ostream () |
Base destructor. | |
__ostream_type & | flush () |
Synchronizing the stream buffer. | |
pos_type | tellp () |
Getting the current write position. | |
__ostream_type & | seekp (pos_type) |
Changing the current write position. | |
__ostream_type & | seekp (off_type, ios_base::seekdir) |
Changing the current write position. | |
__ostream_type & | operator<< (__ostream_type &(*__pf)(__ostream_type &)) |
Interface for manipulators. | |
__ostream_type & | operator<< (__ios_type &(*__pf)(__ios_type &)) |
__ostream_type & | operator<< (ios_base &(*__pf)(ios_base &)) |
Arithmetic Inserters | |
All the operator<< functions (aka formatted output functions) have some common behavior. Each starts by constructing a temporary object of type std::basic_ostream::sentry. This can have several effects, concluding with the setting of a status flag; see the sentry documentation for more.If the sentry status is good, the function tries to generate whatever data is appropriate for the type of the argument.
If an exception is thrown during insertion, ios_base::badbit will be turned on in the stream's error state without causing an ios_base::failure to be thrown. The original exception will then be rethrown. | |
__ostream_type & | operator<< (long __n) |
Basic arithmetic inserters. | |
__ostream_type & | operator<< (unsigned long __n) |
__ostream_type & | operator<< (bool __n) |
__ostream_type & | operator<< (short __n) |
__ostream_type & | operator<< (unsigned short __n) |
__ostream_type & | operator<< (int __n) |
__ostream_type & | operator<< (unsigned int __n) |
__ostream_type & | operator<< (double __f) |
__ostream_type & | operator<< (float __f) |
__ostream_type & | operator<< (long double __f) |
__ostream_type & | operator<< (const void *__p) |
__ostream_type & | operator<< (__streambuf_type *__sb) |
Extracting from another streambuf. | |
Unformatted Output Functions | |
All the unformatted output functions have some common behavior. Each starts by constructing a temporary object of type std::basic_ostream::sentry. This has several effects, concluding with the setting of a status flag; see the sentry documentation for more. If the sentry status is good, the function tries to generate whatever data is appropriate for the type of the argument.
If an exception is thrown during insertion, ios_base::badbit will be turned on in the stream's error state. If badbit is on in the stream's exceptions mask, the exception will be rethrown without completing its actions. | |
__ostream_type & | put (char_type __c) |
Simple insertion. | |
void | _M_write (const char_type *__s, streamsize __n) |
__ostream_type & | write (const char_type *__s, streamsize __n) |
Character string insertion. | |
Protected Member Functions | |
basic_ostream () | |
Friends | |
class | sentry |
template<typename _CharT2, typename _Traits2> basic_ostream< _CharT2, _Traits2 > & | operator<< (basic_ostream< _CharT2, _Traits2 > &, _CharT2) |
template<typename _Traits2> basic_ostream< char, _Traits2 > & | operator<< (basic_ostream< char, _Traits2 > &, char) |
template<typename _CharT2, typename _Traits2> basic_ostream< _CharT2, _Traits2 > & | operator<< (basic_ostream< _CharT2, _Traits2 > &, const _CharT2 *) |
template<typename _Traits2> basic_ostream< char, _Traits2 > & | operator<< (basic_ostream< char, _Traits2 > &, const char *) |
template<typename _CharT2, typename _Traits2> basic_ostream< _CharT2, _Traits2 > & | operator<< (basic_ostream< _CharT2, _Traits2 > &, const char *) |
This is the base class for all output streams. It provides text formatting of all builtin types, and communicates with any class derived from basic_streambuf to do the actual output.
Definition at line 58 of file ostream.
|
Reimplemented from std::basic_ios< _CharT, _Traits >. |
|
Reimplemented in std::basic_fstream< _CharT, _Traits >. |
|
Reimplemented from std::basic_ios< _CharT, _Traits >. |
|
Reimplemented in std::basic_ofstream< _CharT, _Traits >, std::basic_iostream< _CharT, _Traits >, std::basic_ostringstream< _CharT, _Traits, _Alloc >, and std::basic_iostream< char >. |
|
|
|
These are standard types. They permit a standardized way of referring to names of (or names dependant on) the template parameters, which are specific to the implementation. Reimplemented from std::basic_ios< _CharT, _Traits >. Reimplemented in std::strstream, std::basic_ofstream< _CharT, _Traits >, std::basic_fstream< _CharT, _Traits >, std::basic_iostream< _CharT, _Traits >, std::basic_ostringstream< _CharT, _Traits, _Alloc >, std::basic_stringstream< _CharT, _Traits, _Alloc >, and std::basic_iostream< char >. |
|
|
Reimplemented from std::basic_ios< _CharT, _Traits >. Reimplemented in std::strstream, std::basic_ofstream< _CharT, _Traits >, std::basic_fstream< _CharT, _Traits >, std::basic_iostream< _CharT, _Traits >, std::basic_ostringstream< _CharT, _Traits, _Alloc >, std::basic_stringstream< _CharT, _Traits, _Alloc >, and std::basic_iostream< char >. Definition at line 65 of file ostream. Referenced by std::basic_ostream< _CharT, _Traits >::seekp(). |
|
Reimplemented from std::basic_ios< _CharT, _Traits >. Reimplemented in std::strstream, std::basic_ofstream< _CharT, _Traits >, std::basic_fstream< _CharT, _Traits >, std::basic_iostream< _CharT, _Traits >, std::basic_ostringstream< _CharT, _Traits, _Alloc >, std::basic_stringstream< _CharT, _Traits, _Alloc >, and std::basic_iostream< char >. Definition at line 64 of file ostream. Referenced by std::basic_ostream< _CharT, _Traits >::seekp(), and std::basic_ostream< _CharT, _Traits >::tellp(). |
|
|
Base constructor. This ctor is almost never called by the user directly, rather from derived classes' initialization lists, which pass a pointer to their own stream buffer. |
|
Base destructor. This does very little apart from providing a virtual base dtor. |
|
|
|
|
|
Synchronizing the stream buffer.
rdbuf() is a null pointer, changes nothing.
Otherwise, calls Definition at line 382 of file ostream.tcc. References std::basic_ios< _CharT, _Traits >::_M_setstate(), std::ios_base::iostate, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >::setstate(). Referenced by std::flush(). |
|
Extracting from another streambuf.
If sb is NULL, the stream will set failbit in its error state.
Characters are extracted from sb and inserted into
If the function inserts no characters, failbit is set. Definition at line 306 of file ostream.tcc. References std::__copy_streambufs(), std::basic_ios< _CharT, _Traits >::_M_setstate(), std::ios_base::iostate, and std::basic_ios< _CharT, _Traits >::setstate(). |
|
Definition at line 283 of file ostream.tcc. References std::__check_facet(), std::basic_ios< _CharT, _Traits >::_M_setstate(), std::ios_base::iostate, and std::basic_ios< _CharT, _Traits >::setstate(). |
|
Definition at line 260 of file ostream.tcc. References std::__check_facet(), std::basic_ios< _CharT, _Traits >::_M_setstate(), std::ios_base::iostate, and std::basic_ios< _CharT, _Traits >::setstate(). |
|
|
|
Definition at line 237 of file ostream.tcc. References std::__check_facet(), std::basic_ios< _CharT, _Traits >::_M_setstate(), std::ios_base::iostate, and std::basic_ios< _CharT, _Traits >::setstate(). |
|
|
|
|
|
|
|
|
|
Definition at line 97 of file ostream.tcc. References std::__check_facet(), std::basic_ios< _CharT, _Traits >::_M_setstate(), std::ios_base::iostate, and std::basic_ios< _CharT, _Traits >::setstate(). |
|
Definition at line 154 of file ostream.tcc. References std::__check_facet(), std::basic_ios< _CharT, _Traits >::_M_setstate(), std::ios_base::iostate, and std::basic_ios< _CharT, _Traits >::setstate(). |
|
Basic arithmetic inserters.
num_get facet) to perform numeric formatting.
Definition at line 120 of file ostream.tcc. References std::__check_facet(), std::basic_ios< _CharT, _Traits >::_M_setstate(), std::basic_ios< _CharT, _Traits >::fill(), std::ios_base::flags(), std::ios_base::fmtflags, std::ios_base::iostate, and std::basic_ios< _CharT, _Traits >::setstate(). |
|
Definition at line 85 of file ostream.tcc. |
|
Definition at line 73 of file ostream.tcc. |
|
Interface for manipulators.
Manuipulators such as Definition at line 62 of file ostream.tcc. |
|
Simple insertion.
Definition at line 330 of file ostream.tcc. References std::basic_ios< _CharT, _Traits >::_M_setstate(), std::ios_base::iostate, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >::setstate(). Referenced by std::endl(), and std::ends(). |
|
Changing the current write position.
fail() is not true, calls rdbuf()->pubseekoff(off,dir) . If that function fails, sets failbit.
Definition at line 446 of file ostream.tcc. References std::basic_ios< _CharT, _Traits >::_M_setstate(), std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::iostate, std::basic_ostream< _CharT, _Traits >::off_type, std::basic_ostream< _CharT, _Traits >::pos_type, std::basic_ios< _CharT, _Traits >::rdbuf(), std::ios_base::seekdir, and std::basic_ios< _CharT, _Traits >::setstate(). |
|
Changing the current write position.
fail() is not true, calls rdbuf()->pubseekpos(pos) . If that function fails, sets failbit.
Definition at line 419 of file ostream.tcc. References std::basic_ios< _CharT, _Traits >::_M_setstate(), std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::iostate, std::basic_ostream< _CharT, _Traits >::off_type, std::basic_ostream< _CharT, _Traits >::pos_type, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >::setstate(). |
|
Getting the current write position.
fail() is not false, returns pos_type (-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,out) .
Definition at line 403 of file ostream.tcc. References std::basic_ios< _CharT, _Traits >::_M_setstate(), std::basic_ios< _CharT, _Traits >::fail(), std::basic_ostream< _CharT, _Traits >::pos_type, and std::basic_ios< _CharT, _Traits >::rdbuf(). |
|
Character string insertion.
|
|
|
|
|
|
|
|
|
|
|
|
|