cplusplus.com cplusplus.com
cplusplus.com   C++ : Reference : IOstream Library : ios
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forum
Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
IOstream Library
manipulators
classes:
· filebuf
· fstream
· ifstream
· ios
· iostream
· ios_base
· istream
· istringstream
· ofstream
· ostream
· ostringstream
· streambuf
· stringbuf
· stringstream
objects:
· cerr
· cin
· clog
· cout
types:
· fpos
· streamoff
· streampos
· streamsize
ios
· ios::ios
· ios::~ios
member functions:
· ios::bad
· ios::clear
· ios::copyfmt
· ios::eof
· ios::exceptions
· ios::fail
· ios::fill
· ios::good
· ios::imbue
· ios::init
· ios::narrow
· ios::operator!
· ios::operator void*
· ios::rdbuf
· ios::rdstate
· ios::setstate
· ios::tie
· ios::widen

-

ios class
<ios>

Base class with type-dependent members for the standard stream classes

ios

The class is designed to be a base class for all of the hierarchy of stream classes.

Both this class and its parent class, ios_base, define the members of all standard streams that are independent of whether the stream object is an input or an output stream. ios_base describes the members that are independent of the template parameters, while this one describes the members that are dependent on the template parameters.

The class adds to the information kept by an ios_base-derived object, the following:

  • fill character: character used to pad a field up to the field width. It can be obtained or modified by calling member function fill.
  • pointer to tied stream: pointer to the stream object which is tied to this stream object. It can be obtained/modified by calling member function tie.
  • pointer to stream buffer: pointer to the associated streambuf object. It can be obtained/modified by calling member function rdbuf.

Member functions

(constructor) Construct object (constructor member)
(destructor) Destruct object (destructor member)

State flag functions:

good Check if the state of the stream is good for i/o operations. (public member function)
eof Check if eofbit is set (public member function)
fail Check if either failbit or badbit is set (public member function)
bad Check if badbit is set (public member function)
operator! Evaluate stream object (public member function)
operator void* Convert to pointer (public member function)
rdstate Get error state flags (public member function)
setstate Set error state flag (public member function)
clear Set error state flags (public member function)

Formatting:

copyfmt Copy formatting information (public member functions)
fill Get/set the fill character (public member function)

Other:

exceptions Get/set exception mask (public member function)
imbue Imbue locale (public member function)
tie Get/set the tied stream (public member function)
rdbuf Get/set the associated stream buffer (public member function)
narrow Narrow character (public member function)
widen Widen character (public member function)

Member functions inherited from ios_base

flags Get/set format flags (public member function)
setf Set specific format flags (public member function)
unsetf Clear specific format flags (public member function)
precision Get/Set floating-point decimal precision (public member function)
width Get/set field width (public member function)
imbue Imbue locale (public member function)
getloc Get current locale (public member function)
xalloc Return a new index for the internal extensible array [static] (public static member function)
iword Get reference to integer element of the internal extensible array (public member function)
pword Get reference to pointer of the internal extensible array (public member function)
register_callback Register event callback function (public member function)
sync_with_stdio Activate/deactivate synchronization of iostream and cstdio streams [static] (public static member function)

© The C++ Resources Network, 2000-2007 - All rights reserved
Spotted an error? - contact us