GNU g++  v5.2.1
GNU Standard C++
stdio_filebuf.h File Reference

This file is a GNU extension to the Standard C++ Library. More...

#include <fstream>
Include dependency graph for stdio_filebuf.h:

Functions

namespace __gnu_cxx _GLIBCXX_VISIBILITY (default)
 

Detailed Description

This file is a GNU extension to the Standard C++ Library.

Function Documentation

namespace __gnu_cxx _GLIBCXX_VISIBILITY ( default  )

Provides a layer of compatibility for C/POSIX.

This GNU extension provides extensions for working with standard C FILE*'s and POSIX file descriptors. It must be instantiated by the user with the type of character used in the file stream, e.g., stdio_filebuf<char>.

deferred initialization

Parameters
__fdAn open file descriptor.
__modeSame meaning as in a standard filebuf.
__sizeOptimal or preferred size of internal buffer, in chars.

This constructor associates a file stream buffer with an open POSIX file descriptor. The file descriptor will be automatically closed when the stdio_filebuf is closed/destroyed.

Parameters
__fAn open FILE*.
__modeSame meaning as in a standard filebuf.
__sizeOptimal or preferred size of internal buffer, in chars. Defaults to system's BUFSIZ.

This constructor associates a file stream buffer with an open C FILE*. The FILE* will not be automatically closed when the stdio_filebuf is closed/destroyed.

Closes the external data stream if the file descriptor constructor was used.

Returns
The underlying file descriptor.

Once associated with an external data stream, this function can be used to access the underlying POSIX file descriptor. Note that there is no way for the library to track what you do with the descriptor, so be careful.

Returns
The underlying FILE*.

This function can be used to access the underlying "C" file pointer. Note that there is no way for the library to track what you do with the file, so be careful.

References __gnu_profile::__size(), and std::__exception_ptr::swap().

Here is the call graph for this function: