Difference between revisions of "cpp/io/ios base"
From cppreference.com
m (Text replace - "{{tdcl list end" to "{{dcl list end") |
m (Text replace - "{{tdcl" to "{{dcl") |
||
Line 47: | Line 47: | ||
{{dcl list begin}} | {{dcl list begin}} | ||
− | {{ | + | {{dcl list h1 | Member types and constants}} |
− | {{ | + | {{dcl list hitem | Type | Explanation}} |
− | {{ | + | {{dcl list template | cpp/io/ios_base/tdcl list openmode}} |
− | {{ | + | {{dcl list template | cpp/io/ios_base/tdcl list fmtflags}} |
− | {{ | + | {{dcl list template | cpp/io/ios_base/tdcl list iostate}} |
− | {{ | + | {{dcl list template | cpp/io/ios_base/tdcl list seekdir}} |
− | {{ | + | {{dcl list template | cpp/io/ios_base/tdcl list event}} |
− | {{ | + | {{dcl list template | cpp/io/ios_base/tdcl list event_callback}} |
− | {{ | + | {{dcl list h2 | Deprecated member types }} |
− | {{ | + | {{dcl list hitem | Type | Explanation}} |
− | {{ | + | {{dcl list item | {{tt|io_state}}{{mark deprecated}} | integer type that may be used like {{tt|iostate}}}} |
− | {{ | + | {{dcl list item | {{tt|open_mode}}{{mark deprecated}} | integer type that may be used like {{tt|openmode}}}} |
− | {{ | + | {{dcl list item | {{tt|seek_dir}}{{mark deprecated}} | integer type that may be used like {{tt|seekdir}}}} |
− | {{ | + | {{dcl list item | {{tt|streamoff}}{{mark deprecated}} | unspecified type that may be used like {{tt|off_type}}, not necessarily {{c|std::streamoff}}}} |
− | {{ | + | {{dcl list item | {{tt|streampos}}{{mark deprecated}} | unspecified type that may be used like {{tt|pos_type}}, not necessarily {{c|std::streampos}}}} |
{{dcl list end}} | {{dcl list end}} |
Revision as of 01:36, 12 June 2012
Template:cpp/io/ios base/sidebar
Defined in header <ios>
|
||
class ios_base; |
||
The class ios_base
is a multipurpose class that serves as the base class for all I/O stream classes. It maintains several kinds of data:
1) state information: stream status flags
2) control information: flags that control formatting of both input and output sequences and the imbued locale
3) private storage: indexed extensible data structure that allows both long and void* members, which may be implemented as two arbitrary-length arrays or a single array of two-element structs or another container.
4) callbacks: arbitrary number of user-defined functions to be called from imbue(), copyfmt(), and ~ios_base()
Typical implementation holds member constants corresponding to all values of fmtflags, iostate, openmode, and seekdir shown below, member variables to maintain current precision, width, and formatting flags, the exception mask, the buffer error state, a resizeable container holding the callbacks, the currently imbued locale, the private storage, and a static integer variable for xalloc().
Contents |
Member functions
Member types and constants | |
Type | Explanation |
Deprecated member types | |
Type | Explanation |
io_state (deprecated)
|
integer type that may be used like iostate
|
open_mode (deprecated)
|
integer type that may be used like openmode
|
seek_dir (deprecated)
|
integer type that may be used like seekdir
|
streamoff (deprecated)
|
unspecified type that may be used like off_type , not necessarily std::streamoff
|
streampos (deprecated)
|
unspecified type that may be used like pos_type , not necessarily std::streampos
|