Namespaces
Variants
Views
Actions

std::ios_base

From cppreference.com
< cpp‎ | io
Revision as of 18:11, 2 November 2012 by P12bot (Talk | contribs)

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

Template:cpp/io/ios base/dcl list constructorTemplate:cpp/io/ios base/dcl list destructorTemplate:cpp/io/ios base/dcl list flagsTemplate:cpp/io/ios base/dcl list setfTemplate:cpp/io/ios base/dcl list unsetfTemplate:cpp/io/ios base/dcl list precisionTemplate:cpp/io/ios base/dcl list widthTemplate:cpp/io/ios base/dcl list imbueTemplate:cpp/io/ios base/dcl list getlocTemplate:cpp/io/ios base/dcl list xallocTemplate:cpp/io/ios base/dcl list iwordTemplate:cpp/io/ios base/dcl list pwordTemplate:cpp/io/ios base/dcl list register callbackTemplate:cpp/io/ios base/dcl list sync with stdioTemplate:cpp/io/ios base/dcl list failureTemplate:cpp/io/ios base/dcl list Init
Formatting
Locales
Internal extensible array
Miscellaneous

Member classes

Template:cpp/io/ios base/dcl list openmodeTemplate:cpp/io/ios base/dcl list fmtflagsTemplate:cpp/io/ios base/dcl list iostateTemplate:cpp/io/ios base/dcl list seekdirTemplate:cpp/io/ios base/dcl list eventTemplate:cpp/io/ios base/dcl list event callback

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