30 #ifndef _STDIO_FILEBUF_H
31 #define _STDIO_FILEBUF_H 1
33 #pragma GCC system_header
37 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
39 _GLIBCXX_BEGIN_NAMESPACE_VERSION
50 template<
typename _CharT,
typename _Traits = std::
char_traits<_CharT> >
55 typedef _CharT char_type;
56 typedef _Traits traits_type;
57 typedef typename traits_type::int_type int_type;
58 typedef typename traits_type::pos_type pos_type;
59 typedef typename traits_type::off_type off_type;
60 typedef std::size_t size_t;
79 size_t __size = static_cast<size_t>(BUFSIZ));
91 stdio_filebuf(std::__c_file* __f, std::ios_base::openmode __mode,
92 size_t __size = static_cast<size_t>(BUFSIZ));
110 fd() {
return this->_M_file.fd(); }
120 file() {
return this->_M_file.file(); }
123 template<
typename _CharT,
typename _Traits>
127 template<
typename _CharT,
typename _Traits>
131 this->_M_file.sys_open(__fd, __mode);
134 this->_M_mode = __mode;
135 this->_M_buf_size = __size;
136 this->_M_allocate_internal_buffer();
137 this->_M_reading =
false;
138 this->_M_writing =
false;
139 this->_M_set_buffer(-1);
143 template<
typename _CharT,
typename _Traits>
148 this->_M_file.sys_open(__f, __mode);
151 this->_M_mode = __mode;
152 this->_M_buf_size = __size;
153 this->_M_allocate_internal_buffer();
154 this->_M_reading =
false;
155 this->_M_writing =
false;
156 this->_M_set_buffer(-1);
160 _GLIBCXX_END_NAMESPACE_VERSION
basic_filebuf()
Does not open any files.
Provides a layer of compatibility for C/POSIX.This GNU extension provides extensions for working with...
The actual work of input and output (for files).This class associates both its input and output seque...