template<typename _CharT, typename _Traits>
class std::basic_ostream< _CharT, _Traits >
Template class basic_ostream.
- Template Parameters
-
_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.
Definition at line 88 of file iosfwd.
template<typename _CharT , typename _Traits >
Synchronizing the stream buffer.
- Returns
- *this
If rdbuf()
is a null pointer, changes nothing.
Otherwise, calls rdbuf()->pubsync()
, and if that returns -1, sets badbit.
Definition at line 222 of file ostream.tcc.
template<typename _CharT , typename _Traits >
Extracting from another streambuf.
- Parameters
-
__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:
- the input stream reaches end-of-file,
- insertion into the output sequence fails (in this case, the character that would have been inserted is not extracted), or
- an exception occurs while getting a character from
__sb
, which sets failbit in the error state
If the function inserts no characters, failbit is set.
Definition at line 125 of file ostream.tcc.
template<typename _CharT , typename _Traits >
Floating point arithmetic inserters.
- Parameters
-
__f | A variable of builtin floating point type. |
- Returns
*this
if successful
These functions use the stream's current locale (specifically, the num_get
facet) to perform numeric formatting.
Definition at line 222 of file ostream.
template<typename _CharT , typename _Traits >
Floating point arithmetic inserters.
- Parameters
-
__f | A variable of builtin floating point type. |
- Returns
*this
if successful
These functions use the stream's current locale (specifically, the num_get
facet) to perform numeric formatting.
Definition at line 226 of file ostream.
template<typename _CharT , typename _Traits >
Floating point arithmetic inserters.
- Parameters
-
__f | A variable of builtin floating point type. |
- Returns
*this
if successful
These functions use the stream's current locale (specifically, the num_get
facet) to perform numeric formatting.
Definition at line 234 of file ostream.
template<typename _CharT , typename _Traits >
Changing the current write position.
- Parameters
-
__off | A file offset object. |
__dir | The direction in which to seek. |
- Returns
- *this
If fail()
is not true, calls rdbuf()->pubseekoff(off,dir)
. If that function fails, sets failbit.
Definition at line 288 of file ostream.tcc.
template<typename _CharT , typename _Traits >
Changing the current write position.
- Parameters
-
__pos | A file position object. |
- Returns
- *this
If fail()
is not true, calls rdbuf()->pubseekpos(pos)
. If that function fails, sets failbit.
Definition at line 269 of file ostream.tcc.
template<typename _CharT , typename _Traits >
Getting the current write position.
- Returns
- A file position object.
If fail()
is not false, returns pos_type
(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,out)
.
Definition at line 257 of file ostream.tcc.