29 #ifndef _STDIO_FILEBUF_H 30 #define _STDIO_FILEBUF_H 1 32 #pragma GCC system_header 38 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
40 _GLIBCXX_BEGIN_NAMESPACE_VERSION
51 template<
typename _CharT,
typename _Traits = std::
char_traits<_CharT> >
56 typedef _CharT char_type;
57 typedef _Traits traits_type;
58 typedef typename traits_type::int_type int_type;
59 typedef typename traits_type::pos_type pos_type;
60 typedef typename traits_type::off_type off_type;
61 typedef std::size_t size_t;
80 size_t __size = static_cast<size_t>(_GLIBCXX_BUFSIZ));
92 stdio_filebuf(std::__c_file* __f, std::ios_base::openmode __mode,
93 size_t __size = static_cast<size_t>(_GLIBCXX_BUFSIZ));
102 #if __cplusplus >= 201103L 120 fd() {
return this->_M_file.fd(); }
130 file() {
return this->_M_file.file(); }
133 template<
typename _CharT,
typename _Traits>
137 template<
typename _CharT,
typename _Traits>
141 this->_M_file.sys_open(__fd, __mode);
146 this->_M_allocate_internal_buffer();
148 this->_M_writing =
false;
153 template<
typename _CharT,
typename _Traits>
158 this->_M_file.sys_open(__f, __mode);
163 this->_M_allocate_internal_buffer();
165 this->_M_writing =
false;
170 _GLIBCXX_END_NAMESPACE_VERSION
Provides a layer of compatibility for C/POSIX.This GNU extension provides extensions for working with...
bool is_open() const
Returns true if the external file is open.
ISO C++ entities toplevel namespace is std.
basic_filebuf()
Does not open any files.
ios_base::openmode _M_mode
Place to stash in || out || in | out settings for current filebuf.
The actual work of input and output (for files).
GNU extensions for public use.
void _M_set_buffer(streamsize __off)