std::basic_ifstream (3) - Linux Manuals
std::basic_ifstream: std::basic_ifstream
NAME
std::basic_ifstream - std::basic_ifstream
Synopsis
Defined in header <fstream>
template<
class CharT,
class Traits = std::char_traits<CharT>
> class basic_ifstream : public std::basic_istream<CharT, Traits>
The class template basic_ifstream implements high-level input operations on file based streams. It interfaces a file-based streambuffer (std::basic_filebuf) with the high-level interface of (std::basic_istream).
A typical implementation of std::basic_ifstream holds only one non-derived data member: an instance of std::basic_filebuf<CharT, Traits>.
 std-basic ifstream-inheritance.svg
Inheritance diagram
Two specializations for common character types are also defined:
Defined in header <fstream>
Type      Definition
ifstream  basic_ifstream<char>
wifstream basic_ifstream<wchar_t>
Member types
Member type Definition
char_type   CharT
traits_type Traits; the program is ill-formed if Traits::char_type is not CharT.
int_type    Traits::int_type
pos_type    Traits::pos_type
off_type    Traits::off_type
Member functions
 
 
 
 
 
constructor                     (public member function)
destructor                      destructs the basic_ifstream and the associated buffer, closes the file
 
[virtual] (implicitly declared)
operator=                       moves the file stream
 
(C++11)
swap                            swaps two file streams
 
(C++11)
 
rdbuf                           (public member function)
File operations
 
is_open                         (public member function)
 
open                            (public member function)