Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library Reference Guide

basic_ios

Library:  Input/output


basic_ios ios_base

Local Index

Members

Non-Members

Summary

A base class that includes the common character-dependent functionality and state required by all streams

Synopsis

#include <ios>

namespace std {
  template<class charT, class traits = char_traits<charT> >
  class basic_ios;
}

Description

The class basic_ios is a base class that includes the common character-dependent functionality and data members required by all streams. It maintains state information that reflects the integrity of the stream and stream buffer. It also maintains the link between the stream classes and the stream buffer classes via the rdbuf() member functions. Classes derived from basic_ios specialize operations for input and output.

Interface

Member Types

char_type
int_type
off_type
pos_type
traits_type

Nonmember Types

ios
wios

Public Constructor

explicit basic_ios(basic_streambuf<charT, traits>* sb); 

Protected Constructor

basic_ios();

Destructor

virtual ~basic_ios();

Public Member Functions

bool 
bad() const; 
void 
clear(iostate state = goodbit); 
basic_ios& 
copyfmt(const basic_ios& rhs); 

Table 40: copyfmt() Postconditions

Element Value

rdbuf()

unchanged

tie()

rhs.tie()

rdstate()

unchanged

exceptions()

rhs.exceptions()

flags()

rhs.flags()

width()

rhs.width()

precision()

rhs.precision()

fill()

rhs.fill()

getloc()

rhs.getloc()

bool 
eof() const; 
iostate 
exceptions() const; 
void 
exceptions(iostate except); 
bool 
fail() const; 
char_type 
fill() const; 
char_type 
fill(char_type fillch); 
bool 
good() const; 
locale 
imbue(const locale& loc); 
void 
init(basic_streambuf<charT,traits>* sb); 

Table 41: init() Postconditions

Element Value

rdbuf()

sb

tie()

0

rdstate()

sb ? goodbit : badbit

exceptions()

goodbit

flags()

skipws | dec

width()

0

precision()

6

fill()

widen(' ')

getloc()

locale::global()

char 
narrow(charT c, char dfault) const; 
bool 
operator!() const; 
basic_streambuf<charT,traits>*  
rdbuf() const; 
basic_streambuf<charT,traits>*  
rdbuf(basic_streambuf<charT,traits>* sb); 
iostate 
rdstate() const; 
void 
setstate(iostate state); 
basic_ostream<charT,traits>* 
tie() const; 
basic_ostream<charT,traits>* 
tie(basic_ostream<charT,traits>*  tiestr); 
operator 
void*() const; 
charT 
widen(char c) const; 

See Also

ios_base, basic_istream, basic_ostream, basic_streambuf, char_traits

Standards Conformance

ISO/IEC 14882:1998 -- International Standard for Information Systems --Programming Language C++, Section 27.4.4



Previous fileTop of DocumentContentsIndex pageNext file