Inheritance diagram for std::basic_ifstream< _CharT, _Traits >:

Public Types | |
| typedef _CharT | char_type |
| typedef _Traits | traits_type |
| typedef traits_type::int_type | int_type |
| typedef traits_type::pos_type | pos_type |
| typedef traits_type::off_type | off_type |
| typedef basic_filebuf< char_type, traits_type > | __filebuf_type |
| typedef basic_istream< char_type, traits_type > | __istream_type |
Public Member Functions | |
| basic_ifstream () | |
| Default constructor. | |
| basic_ifstream (const char *__s, ios_base::openmode __mode=ios_base::in) | |
| Create an input file stream. | |
| ~basic_ifstream () | |
| The destructor does nothing. | |
| __filebuf_type * | rdbuf () const |
| Accessing the underlying buffer. | |
| bool | is_open () |
| Wrapper to test for an open file. | |
| void | open (const char *__s, ios_base::openmode __mode=ios_base::in) |
| Opens an external file. | |
| void | close () |
| Close the file. | |
Private Attributes | |
| __filebuf_type | _M_filebuf |
This class supports reading from named files, using the inherited functions from std::basic_istream. To control the associated sequence, an instance of std::basic_filebuf is used, which this page refers to as sb.
Definition at line 478 of file fstream.
|
|||||
|
|
|
|||||
|
Reimplemented from std::basic_istream< _CharT, _Traits >. Definition at line 490 of file fstream. Referenced by std::basic_ifstream< _CharT, _Traits >::basic_ifstream(). |
|
|||||
|
These are standard types. They permit a standardized way of referring to names of (or names dependant on) the template parameters, which are specific to the implementation. Reimplemented from std::basic_istream< _CharT, _Traits >. |
|
|||||
|
Reimplemented from std::basic_istream< _CharT, _Traits >. |
|
|||||
|
Reimplemented from std::basic_istream< _CharT, _Traits >. |
|
|||||
|
Reimplemented from std::basic_istream< _CharT, _Traits >. |
|
|||||
|
Reimplemented from std::basic_istream< _CharT, _Traits >. |
|
|||||||||
|
Default constructor.
Initializes Definition at line 509 of file fstream. References std::basic_ifstream< _CharT, _Traits >::__istream_type, std::basic_ifstream< _CharT, _Traits >::_M_filebuf, and std::basic_ios< _CharT, _Traits >::init(). |
|
||||||||||||||||
|
Create an input file stream.
ios_base::in is automatically included in mode.Tip: When using std::string to hold the filename, you must use .c_str() before passing it to this constructor. Definition at line 523 of file fstream. References std::basic_ifstream< _CharT, _Traits >::__istream_type, std::basic_ifstream< _CharT, _Traits >::_M_filebuf, std::basic_ios< _CharT, _Traits >::init(), std::basic_ifstream< _CharT, _Traits >::open(), and std::ios_base::openmode. |
|
|||||||||
|
The destructor does nothing. The file is closed by the filebuf object, not the formatting stream. |
|
|||||||||
|
Close the file.
Calls Definition at line 582 of file fstream. References std::basic_ifstream< _CharT, _Traits >::_M_filebuf, and std::basic_ios< _CharT, _Traits >::setstate(). |
|
|||||||||
|
Wrapper to test for an open file.
Definition at line 555 of file fstream. References std::basic_ifstream< _CharT, _Traits >::_M_filebuf. |
|
||||||||||||||||
|
Opens an external file.
std::basic_filebuf::open(s,mode|in). If that function fails, failbit is set in the stream's error state.Tip: When using std::string to hold the filename, you must use .c_str() before passing it to this constructor. Definition at line 569 of file fstream. References std::basic_ifstream< _CharT, _Traits >::_M_filebuf, std::ios_base::openmode, and std::basic_ios< _CharT, _Traits >::setstate(). Referenced by std::basic_ifstream< _CharT, _Traits >::basic_ifstream(). |
|
|||||||||
|
Accessing the underlying buffer.
Reimplemented from std::basic_ios< _CharT, _Traits >. Definition at line 547 of file fstream. References std::basic_ifstream< _CharT, _Traits >::_M_filebuf. |
|
|||||
1.3.6