Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/io/ios base"

From cppreference.com
< cpp‎ | io
m (actually, pword/iword storage is not necessarily two arrays, not in gcc for example)
m (typo)
Line 10: Line 10:
 
{{li|1}} state information: stream status flags
 
{{li|1}} state information: stream status flags
 
{{li|2}} control information: flags that control formatting of both input and output sequences and the imbued locale
 
{{li|2}} control information: flags that control formatting of both input and output sequences and the imbued locale
{{li|3}} private storage: indexed extensible static data structure that allows both {{c|long}} and {{c|void*}} members, which may be implemented as two arbitrary-length arrays or a single array of two-elemnet structs or another container.
+
{{li|3}} private storage: indexed extensible static data structure that allows both {{c|long}} and {{c|void*}} members, which may be implemented as two arbitrary-length arrays or a single array of two-element structs or another container.
 
{{li|4}} callbacks: arbitrary number of user-defined functions to be called from imbue(), copyfmt(), and ~ios()
 
{{li|4}} callbacks: arbitrary number of user-defined functions to be called from imbue(), copyfmt(), and ~ios()
 
{{li end}}
 
{{li end}}

Revision as of 05:24, 25 April 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 static 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()

Typical implementation holds member constants corresponding to all values of fmtflags, iostate, openmode, and seekdir shown below, member variables to maintain current precision, width, formatting flags, exception mask, buffer error state, a resizeable container holding the callbacks, the currently imbued locale, pointer or pointers to the private storage, and a static integer variable returned by 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:tdcl list begin Template:tdcl list h1 Template:tdcl list hitem Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list h2 Template:tdcl list hitem Template:tdcl list item Template:tdcl list item Template:tdcl list item Template:tdcl list item Template:tdcl list item Template:tdcl list end