Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

basic_fstream


inherits frombasic_ostream basic_fstreaminherits frombasic_iostream inherits frombasic_iosinherits fromios_base inherits frombasic_istream

Summary

Supports reading and writing of named files or 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_fstream 
: public basic_iostream<charT, traits>

Description

The template class basic_fstream<charT,traits> supports reading and writing to 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_iostream and can therefore use all the formatted and unformatted input and output functions.

Interface

Types

char_type
fstream
int_type
ios_type
off_type
pos_type
traits_type
wfstream

Constructors

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

Destructors

virtual ~basic_fstream();

Member Functions

void 
close();
bool 
is_open();
void 
open(const char* s,ios_base::openmode =
     ios_base::out | 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_ifstream(3C++), basic_ofstream(3C++)

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

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