|
libstdc++
|
Classes | |
| class | sentry |
Public Types | |
| typedef ctype< _CharT > | __ctype_type |
| typedef basic_ios< _CharT, _Traits > | __ios_type |
| typedef num_put< _CharT, ostreambuf_iterator< _CharT, _Traits > > | __num_put_type |
| typedef basic_ostream< _CharT, _Traits > | __ostream_type |
| typedef basic_streambuf< _CharT, _Traits > | __streambuf_type |
| typedef _CharT | char_type |
| typedef _Traits::int_type | int_type |
| typedef _Traits::off_type | off_type |
| typedef _Traits::pos_type | pos_type |
| typedef _Traits | traits_type |
Public Member Functions | |
| basic_ostream (__streambuf_type *__sb) | |
| virtual | ~basic_ostream () |
| template<typename _ValueT > | |
| basic_ostream< _CharT, _Traits > & | _M_insert (_ValueT __v) |
| __ostream_type & | flush () |
| __ostream_type & | operator<< (__streambuf_type *__sb) |
| __ostream_type & | operator<< (const void *__p) |
| __ostream_type & | operator<< (nullptr_t) |
| __ostream_type & | seekp (off_type, ios_base::seekdir) |
| __ostream_type & | seekp (pos_type) |
| pos_type | tellp () |
Protected Member Functions | |
| basic_ostream (basic_iostream< _CharT, _Traits > &) | |
| basic_ostream (basic_ostream &&__rhs) | |
| basic_ostream (const basic_ostream &)=delete | |
| template<typename _ValueT > | |
| __ostream_type & | _M_insert (_ValueT __v) |
| basic_ostream & | operator= (basic_ostream &&__rhs) |
| basic_ostream & | operator= (const basic_ostream &)=delete |
| void | swap (basic_ostream &__rhs) |
Friends | |
| class | sentry |
Template class basic_ostream.
| _CharT | Type of character stream. |
| _Traits | Traits for character type, defaults to char_traits<_CharT>. |
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.
|
inlineexplicit |
|
inlinevirtual |
| basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::flush |
Synchronizing the stream buffer.
If rdbuf() is a null pointer, changes nothing.
Otherwise, calls rdbuf()->pubsync(), and if that returns -1, sets badbit.
Definition at line 226 of file ostream.tcc.
|
inline |
|
inline |
| basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::operator<< | ( | __streambuf_type * | __sb | ) |
Extracting from another streambuf.
| __sb | A pointer to a streambuf |
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from __sb and inserted into *this until one of the following occurs:
__sb, which sets failbit in the error stateIf the function inserts no characters, failbit is set.
Definition at line 129 of file ostream.tcc.
|
inline |
|
inline |
|
inline |
|
inline |
| basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::operator<< | ( | int | __n | ) |
Integer arithmetic inserters.
| __n | A variable of builtin integral type. |
*this if successfulThese functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 115 of file ostream.tcc.
|
inline |
|
inline |
|
inline |
|
inline |
| basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::operator<< | ( | short | __n | ) |
Integer arithmetic inserters.
| __n | A variable of builtin integral type. |
*this if successfulThese functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 101 of file ostream.tcc.
|
inline |
|
inline |
|
inline |
|
inline |
| basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::put | ( | char_type | __c | ) |
Simple insertion.
| __c | The character to insert. |
Tries to insert __c.
Definition at line 158 of file ostream.tcc.
| basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::seekp | ( | off_type | __off, |
| ios_base::seekdir | __dir | ||
| ) |
Changing the current write position.
| __off | A file offset object. |
| __dir | The direction in which to seek. |
If fail() is not true, calls rdbuf()->pubseekoff(off,dir). If that function fails, sets failbit.
Definition at line 292 of file ostream.tcc.
| basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::seekp | ( | pos_type | __pos | ) |
Changing the current write position.
| __pos | A file position object. |
If fail() is not true, calls rdbuf()->pubseekpos(pos). If that function fails, sets failbit.
Definition at line 273 of file ostream.tcc.
| basic_ostream< _CharT, _Traits >::pos_type std::basic_ostream< _CharT, _Traits >::tellp |
Getting the current write position.
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,out).
Definition at line 261 of file ostream.tcc.
| basic_ostream< _CharT, _Traits > & std::basic_ostream< _CharT, _Traits >::write | ( | const char_type * | __s, |
| streamsize | __n | ||
| ) |
Character string insertion.
| __s | The array to insert. |
| __n | Maximum number of characters to insert. |
Characters are copied from __s and inserted into the stream until one of the following happens:
__n characters are insertedDefinition at line 192 of file ostream.tcc.