Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

basic_ifstream


basic_ifstreaminherits frombasic_istreaminherits frombasic_iosinherits fromios_base

Summary

Supports reading from named files or other devices associated with a file descriptor.

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

Synopsis

#include <fstream> 
template<class charT, class traits = char_traits<charT> >
class basic_ifstream
: public basic_istream<charT, traits>

Description

The template class basic_ifstream<charT,traits> supports reading from named files or other devices associated with a file descriptor. It uses a basic_filebuf object to control the associated sequences. It inherits from basic_istream and can therefore use all the formatted and unformatted input functions.

Interface

Types

char_type
ifstream
int_type
ios_type
off_type
pos_type
traits_type
wifstream

Constructors

basic_ifstream();
basic_ifstream(const char* s,
               ios_base::openmode mode= ios_base::in,
               long protection= 0666); 
explicit basic_ifstream(int fd); 
basic_ifstream(int fd, char_type* buf,int len); 

Destructors

virtual ~basic_ifstream();

Member Functions

void 
close();
bool 
is_open();
void 
open(const char* s,ios_base::openmode =
     ios_base::in, long protection = 0666); 
basic_filebuf<charT,traits>* 
rdbuf() const; 

Example

See Also

char_traits(3C++), ios_base(3C++), basic_ios(3C++), basic_filebuf(3C++), basic_ofstream(3C++), basic_fstream(3C++)

Working Paper for Draft Proposed International Standard for Information Systems--Programming Language C++, Section 27.8.1.5

Standards Conformance

ANSI X3J16/ISO WG21 Joint C++ Committee



Previous fileTop of documentContentsIndexNext file
©Copyright 1998, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.
OEM Release, June 1998