List of all members.
Public Types
Public Member Functions
Protected Member Functions
-
void _M_allocate_internal_buffer ()
-
bool _M_convert_to_external (char_type *, streamsize)
- void _M_create_pback ()
-
void _M_destroy_internal_buffer () throw ()
- void _M_destroy_pback () throw ()
-
int _M_get_ext_pos (__state_type &__state)
-
pos_type _M_seek (off_type __off, ios_base::seekdir __way, __state_type __state)
- void _M_set_buffer (streamsize __off)
-
bool _M_terminate_output ()
-
virtual void imbue (const locale &__loc)
-
virtual int_type overflow (int_type __c=_Traits::eof())
-
virtual int_type pbackfail (int_type __c=_Traits::eof())
-
virtual pos_type seekoff (off_type __off, ios_base::seekdir __way, ios_base::openmode __mode=ios_base::in|ios_base::out)
-
virtual pos_type seekpos (pos_type __pos, ios_base::openmode __mode=ios_base::in|ios_base::out)
- virtual __streambuf_type * setbuf (char_type *__s, streamsize __n)
-
virtual streamsize showmanyc ()
-
virtual int sync ()
-
virtual int_type underflow ()
-
virtual streamsize xsgetn (char_type *__s, streamsize __n)
-
virtual streamsize xsputn (const char_type *__s, streamsize __n)
Protected Attributes
|
Friends
Detailed Description
Member Function Documentation
void std::basic_filebuf::_M_create_pback |
( |
| ) |
[inline, protected, inherited] |
Initializes pback buffers, and moves normal buffers to safety. Assumptions: _M_in_cur has already been moved back
Definition at line 174 of file fstream.
void std::basic_filebuf::_M_destroy_pback |
( |
| ) |
throw () [inline, protected, inherited] |
Deactivates pback buffer contents, and restores normal buffer. Assumptions: The pback buffer has only moved forward.
Definition at line 191 of file fstream.
void std::basic_filebuf::_M_set_buffer |
( |
streamsize |
__off | ) |
[inline, protected, inherited] |
This function sets the pointers of the internal buffer, both get and put areas. Typically:
__off == egptr() - eback() upon underflow/uflow (read mode); __off == 0 upon overflow (write mode); __off == -1 upon open, setbuf, seekoff/pos (uncommitted mode).
NB: epptr() - pbase() == _M_buf_size - 1, since _M_buf_size reflects the actual allocated memory and the last cell is reserved for the overflow char of a full put area.
Definition at line 392 of file fstream.
Closes the currently associated file.
- Returns:
this
on success, NULL on failure
If no file is currently open, this function immediately fails.
If a put buffer area exists, overflow(eof)
is called to flush all the characters. The file is then closed.
If any operations fail, this function also fails.
bool std::basic_filebuf::is_open |
( |
| ) |
const throw () [inline, inherited] |
Returns true if the external file is open.
Definition at line 224 of file fstream.
__filebuf_type* std::basic_filebuf::open |
( |
const char * |
__s, |
|
|
ios_base::openmode |
__mode |
|
) |
| [inherited] |
Opens an external file.
- Parameters:
-
s | The name of the file. |
mode | The open mode flags. |
- Returns:
this
on success, NULL on failure
If a file is already open, this function immediately fails. Otherwise it tries to open the file named s using the flags given in mode.
Table 92, adapted here, gives the relation between openmode combinations and the equivalent fopen() flags. (NB: lines app, in|out|app, in|app, binary|app, binary|in|out|app, and binary|in|app per DR 596) +---------------------------------------------------------+ | ios_base Flag combination stdio equivalent | |binary in out trunc app | +---------------------------------------------------------+ | + w | | + + a | | + a | | + + w | | + r | | + + r+ | | + + + w+ | | + + + a+ | | + + a+ | +---------------------------------------------------------+ | + + wb | | + + + ab | | + + ab | | + + + wb | | + + rb | | + + + r+b | | + + + + w+b | | + + + + a+b | | + + + a+b | +---------------------------------------------------------+
Opens an external file.
- Parameters:
-
s | The name of the file. |
mode | The open mode flags. |
- Returns:
this
on success, NULL on failure
Definition at line 277 of file fstream.
Member Data Documentation
Pointer to the beginning of internal buffer.
Definition at line 111 of file fstream.
Actual size of internal buffer. This number is equal to the size of the put area + 1 position, reserved for the overflow char of a full area.
Definition at line 118 of file fstream.
Buffer for external characters. Used for input when codecvt::always_noconv() == false. When valid, this corresponds to eback().
Definition at line 153 of file fstream.
Size of buffer held by _M_ext_buf.
Definition at line 158 of file fstream.
Pointers into the buffer held by _M_ext_buf that delimit a subsequence of bytes that have been read but not yet converted. When valid, _M_ext_next corresponds to egptr().
Definition at line 165 of file fstream.
Place to stash in || out || in | out settings for current filebuf.
Definition at line 96 of file fstream.
Necessary bits for putback buffer management.
- Note:
- pbacks of over one character are not currently supported.
Definition at line 139 of file fstream.
Necessary bits for putback buffer management.
- Note:
- pbacks of over one character are not currently supported.
Definition at line 140 of file fstream.
Necessary bits for putback buffer management.
- Note:
- pbacks of over one character are not currently supported.
Definition at line 141 of file fstream.
Necessary bits for putback buffer management.
- Note:
- pbacks of over one character are not currently supported.
Definition at line 142 of file fstream.
_M_reading == false && _M_writing == false for uncommitted mode; _M_reading == true for read mode; _M_writing == true for write mode;
NB: _M_reading == true && _M_writing == true is unused.
Definition at line 130 of file fstream.
The documentation for this class was generated from the following file: