Click on the banner to return to the class reference home page.

basic_ios


basic_Iosios_base

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <ios>
template<class charT, class traits = char_traits<charT> >
class basic_ios : public ios_base

Description

The class basic_ios is a base class that provides the common functionality 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 buffers classes via the rdbuf member functions. Classes derived from basic_ios specialize operations for input, and output.

Interface

template<class charT, class traits = char_traits<charT> >
class basic_ios : public ios_base { 

   public:

    typedef basic_ios<charT, traits>           ios_type;
    typedef basic_streambuf<charT, traits>     streambuf_type; 
    typedef basic_ostream<charT, traits>       ostream_type;

    typedef typename traits::char_type         char_type;
    typedef traits                             traits_type;

    typedef typename traits::int_type          int_type;
    typedef typename traits::off_type          off_type;
    typedef typename traits::pos_type          pos_type;
    

    explicit basic_ios(basic_streambuf<charT, traits> *sb_arg);
    virtual ~basic_ios();

    char_type fill() const;       
    char_type fill(char_type ch);
      
    void exceptions(iostate except);
    iostate exceptions() const;

    void clear(iostate state = goodbit);

    void setstate(iostate state);
    iostate rdstate() const;

    operator void*() const;
    bool operator!() const;

    bool good() const;
    bool eof() const;
    bool fail() const;
    bool bad() const;

    ios_type& copyfmt(const ios_type& rhs);

    ostream_type *tie() const;
    ostream_type *tie(ostream_type *tie_arg);

    streambuf_type *rdbuf() const;
    streambuf_type *rdbuf( streambuf_type *sb);

    locale imbue(const locale& loc);

    char narrow(charT, char) const;
    charT widen(char) const;

   protected:

    basic_ios();

    void init(basic_streambuf<charT, traits> *sb);
};

Types

char_type
ios
int_type
ios_type
off_type
ostream_type
pos_type
streambuf_type
traits_type
wios

Public Constructors

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

Public Destructor

virtual ~basic_ios();

Public Member Functions

bool 
bad() const;
void 
clear(iostate state = goodbit);
basic_ios& 
copyfmt(const basic_ios& rhs);
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);
char 
narrow(charT c, char dfault) const;
bool 
operator!() const;
streambuf_type* 
rdbuf() const;
streambuf_type* 
rdbuf(streambuf_type* sb);
iostate 
rdstate() const;
void 
setstate(iostate state);
ostream_type* 
tie() const;
ostream_type* 
tie(ostream_type* tiestr);
operator 
void*() const;
charT 
widen(char c) const;

See Also

ios_base(3C++), basic_istream(3C++), basic_ostream(3C++), basic_streambuf(3C++), char_traits(3C++)

Working Paper for Draft Proposed International Standard for Information Systems--Programming Language C++.

Standards Conformance

ANSI X3J16/ISO WG21 Joint C++ Committee


©Copyright 1996, Rogue Wave Software, Inc.