libstdc++
__gnu_cxx::enc_filebuf Class Reference
Inheritance diagram for __gnu_cxx::enc_filebuf:

List of all members.

Public Types

Public Member Functions

Protected Member Functions

Protected Attributes

Friends


Detailed Description

class enc_filebuf.


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.

__filebuf_type* std::basic_filebuf::close ( ) [inherited]

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:
sThe name of the file.
modeThe 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 | +---------------------------------------------------------+

__filebuf_type* std::basic_filebuf::open ( const std::string __s,
ios_base::openmode  __mode 
) [inline, inherited]

Opens an external file.

Parameters:
sThe name of the file.
modeThe open mode flags.
Returns:
this on success, NULL on failure

Definition at line 277 of file fstream.

virtual __streambuf_type* std::basic_filebuf::setbuf ( char_type *  __s,
streamsize  __n 
) [protected, virtual, inherited]

Manipulates the buffer.

Parameters:
sPointer to a buffer area.
nSize of s.
Returns:
this

If no file has been opened, and both s and n are zero, then the stream becomes unbuffered. Otherwise, s is used as a buffer; see http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch25s02.html for more.


Member Data Documentation

char_type* std::basic_filebuf::_M_buf [protected, inherited]

Pointer to the beginning of internal buffer.

Definition at line 111 of file fstream.

size_t std::basic_filebuf::_M_buf_size [protected, inherited]

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.

char* std::basic_filebuf::_M_ext_buf [protected, inherited]

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.

streamsize std::basic_filebuf::_M_ext_buf_size [protected, inherited]

Size of buffer held by _M_ext_buf.

Definition at line 158 of file fstream.

const char* std::basic_filebuf::_M_ext_next [protected, inherited]

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.

ios_base::openmode std::basic_filebuf::_M_mode [protected, inherited]

Place to stash in || out || in | out settings for current filebuf.

Definition at line 96 of file fstream.

char_type std::basic_filebuf::_M_pback [protected, inherited]

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.

bool std::basic_filebuf::_M_pback_init [protected, inherited]

Necessary bits for putback buffer management.

Note:
pbacks of over one character are not currently supported.

Definition at line 142 of file fstream.

bool std::basic_filebuf::_M_reading [protected, inherited]

_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: