std::basic_ostream< _CharT, _Traits >
Template class basic_ostream.
- Provided by: libstdc++-7-doc (Version: 7.5.0-6ubuntu2)
- Source: gcc-7
- Report a bug
Template class basic_ostream.
Inherited by std::basic_ofstream< _CharT, _Traits >.
class sentry
Performs setup work for output streams.
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
basic_ostream (__streambuf_type *__sb)
Base constructor. virtual ~basic_ostream ()
Base destructor. template<typename _ValueT > basic_ostream<
_CharT, _Traits > & _M_insert (_ValueT __v)
__ostream_type & operator<< (__ios_type
&(*__pf)(__ios_type &))
__ostream_type & operator<< (__ostream_type
&(*__pf)(__ostream_type &))
Interface for manipulators. __ostream_type &
operator<< (ios_base &(*__pf)(ios_base
&))
class sentry
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)
Core write functionality, without sentry. __ostream_type &
write (const char_type *__s, streamsize __n)
Character string insertion. __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. basic_ostream ()
Simple insertion. basic_ostream (basic_iostream< _CharT,
_Traits > &)
Simple insertion. basic_ostream (const basic_ostream
&)=delete
Simple insertion. basic_ostream (basic_ostream &&__rhs)
Simple insertion. basic_ostream & operator= (const
basic_ostream &)=delete
Simple insertion. basic_ostream & operator=
(basic_ostream &&__rhs)
Simple insertion. void swap (basic_ostream &__rhs)
Simple insertion. template<typename _ValueT > __ostream_type
& _M_insert (_ValueT __v)
Simple insertion.
class std::basic_ostream< _CharT, _Traits >" Template class basic_ostream.
Template Parameters
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 86 of file iosfwd.
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.
Definition at line 84 of file ostream.
Base destructor. This does very little apart from providing a virtual base dtor.
Definition at line 93 of file ostream.
Simple insertion.
Parameters
Returns
Tries to insert __c.
Note
Definition at line 384 of file ostream.
Simple insertion.
Parameters
Returns
Tries to insert __c.
Note
Definition at line 389 of file ostream.
Simple insertion.
Parameters
Returns
Tries to insert __c.
Note
Simple insertion.
Parameters
Returns
Tries to insert __c.
Note
Definition at line 393 of file ostream.
Simple insertion.
Parameters
Returns
Tries to insert __c.
Note
Referenced by std::basic_ostream< char >::operator<<().
Core write functionality, without sentry.
Parameters
Definition at line 311 of file ostream.
Synchronizing the stream buffer.
Returns
If rdbuf() is a null pointer, changes nothing.
Otherwise, calls rdbuf()->pubsync(), and if that returns -1, sets badbit.
Definition at line 211 of file ostream.tcc.
Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry().
Interface for manipulators. Manipulators such as std::endl and std::hex use these functions in constructs like 'std::cout << std::endl'. For more information, see the iomanip header.
Definition at line 108 of file ostream.
Extracting from another streambuf.
Parameters
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:
If the function inserts no characters, failbit is set.
Definition at line 120 of file ostream.tcc.
Integer arithmetic inserters.
Parameters
Returns
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 174 of file ostream.
Pointer arithmetic inserters.
Parameters
Returns
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 245 of file ostream.
Floating point arithmetic inserters.
Parameters
Returns
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 220 of file ostream.
Integer arithmetic inserters.
Parameters
Returns
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 224 of file ostream.
Integer arithmetic inserters.
Parameters
Returns
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 106 of file ostream.tcc.
Integer arithmetic inserters.
Parameters
Returns
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 166 of file ostream.
Integer arithmetic inserters.
Parameters
Returns
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 232 of file ostream.
Integer arithmetic inserters.
Parameters
Returns
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 201 of file ostream.
Integer arithmetic inserters.
Parameters
Returns
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 92 of file ostream.tcc.
Integer arithmetic inserters.
Parameters
Returns
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 192 of file ostream.
Integer arithmetic inserters.
Parameters
Returns
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 170 of file ostream.
Integer arithmetic inserters.
Parameters
Returns
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 205 of file ostream.
Integer arithmetic inserters.
Parameters
Returns
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Definition at line 181 of file ostream.
Simple insertion.
Parameters
Returns
Tries to insert __c.
Note
Definition at line 402 of file ostream.
Simple insertion.
Parameters
Returns
Tries to insert __c.
Note
Simple insertion.
Parameters
Returns
Tries to insert __c.
Note
Definition at line 149 of file ostream.tcc.
Changing the current write position.
Parameters
Returns
If fail() is not true, calls rdbuf()->pubseekoff(off,dir). If that function fails, sets failbit.
Definition at line 290 of file ostream.tcc.
Changing the current write position.
Parameters
Returns
If fail() is not true, calls rdbuf()->pubseekpos(pos). If that function fails, sets failbit.
Definition at line 258 of file ostream.tcc.
Simple insertion.
Parameters
Returns
Tries to insert __c.
Note
Definition at line 409 of file ostream.
Getting the current write position.
Returns
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,out).
Definition at line 237 of file ostream.tcc.
Character string insertion.
Parameters
Returns
Characters are copied from __s and inserted into the stream until one of the following happens:
Note
Definition at line 183 of file ostream.tcc.
Generated automatically by Doxygen for libstdc++ from the source code.