Inheritance diagram for std::basic_fstream< _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 |
Public Methods | |
basic_fstream () | |
Default constructor. | |
basic_fstream (const char *__s, ios_base::openmode __mode=ios_base::in|ios_base::out) | |
Create an input/output file stream. | |
~basic_fstream () | |
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|ios_base::out) |
Opens an external file. | |
void | close () |
Close the file. |
This class supports reading from and writing to named files, using the inherited functions from std::basic_iostream. To control the associated sequence, an instance of std::basic_filebuf is used, which this page refers to as sb.
Definition at line 704 of file fstream.
|
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 > . |
|
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 > . |
|
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 > . |
|
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 > . |
|
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 > . |
|
Default constructor.
Initializes Definition at line 737 of file fstream. References std::basic_ios< _CharT, _Traits >::init() . |
|
Create an input/output file stream.
Definition at line 750 of file fstream. References std::basic_ios< _CharT, _Traits >::init() , and std::basic_fstream< _CharT, _Traits >::open() . |
|
The destructor does nothing. The file is closed by the filebuf object, not the formatting stream. |
|
Close the file.
Calls Definition at line 811 of file fstream. References std::basic_ios< _CharT, _Traits >::setstate() . |
|
Wrapper to test for an open file.
|
|
Opens an external file.
std::basic_filebuf::open(s,mode). 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 797 of file fstream. References std::basic_ios< _CharT, _Traits >::setstate() . Referenced by std::basic_fstream< _CharT, _Traits >::basic_fstream() . |
|
Accessing the underlying buffer.
Reimplemented from std::basic_ios< _CharT, _Traits > . |