.TH "std::basic_filebuf< _CharT, _Traits >" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::basic_filebuf< _CharT, _Traits > \- The actual work of input and output (for files)\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBstd::basic_streambuf< _CharT, _Traits >\fP\&. .PP Inherited by \fB__gnu_cxx::stdio_filebuf< _CharT, _Traits >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "\fBtypedef\fP \fBcodecvt\fP< char_type, char, __state_type > \fB__codecvt_type\fP" .br .ti -1c .RI "\fBtypedef\fP __basic_file< char > \fB__file_type\fP" .br .ti -1c .RI "\fBtypedef\fP \fBbasic_filebuf\fP< char_type, traits_type > \fB__filebuf_type\fP" .br .ti -1c .RI "\fBtypedef\fP traits_type::state_type \fB__state_type\fP" .br .ti -1c .RI "\fBtypedef\fP \fBbasic_streambuf\fP< char_type, traits_type > \fB__streambuf_type\fP" .br .ti -1c .RI "\fBtypedef\fP _CharT \fBchar_type\fP" .br .ti -1c .RI "\fBtypedef\fP traits_type::int_type \fBint_type\fP" .br .ti -1c .RI "\fBtypedef\fP traits_type::off_type \fBoff_type\fP" .br .ti -1c .RI "\fBtypedef\fP traits_type::pos_type \fBpos_type\fP" .br .ti -1c .RI "\fBtypedef\fP _Traits \fBtraits_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBbasic_filebuf\fP ()" .br .RI "Does not open any files\&. " .ti -1c .RI "\fBbasic_filebuf\fP (\fBbasic_filebuf\fP &&)" .br .ti -1c .RI "\fBbasic_filebuf\fP (\fBconst\fP \fBbasic_filebuf\fP &)=\fBdelete\fP" .br .ti -1c .RI "\fBvirtual\fP \fB~basic_filebuf\fP ()" .br .RI "The destructor closes the file first\&. " .ti -1c .RI "\fB__filebuf_type\fP * \fBclose\fP ()" .br .RI "Closes the currently associated file\&. " .ti -1c .RI "\fBlocale\fP \fBgetloc\fP () \fBconst\fP" .br .RI "Locale access\&. " .ti -1c .RI "\fBstreamsize\fP \fBin_avail\fP ()" .br .RI "Looking ahead into the stream\&. " .ti -1c .RI "bool \fBis_open\fP () \fBconst\fP throw ()" .br .RI "Returns true if the external file is open\&. " .ti -1c .RI "\fB__filebuf_type\fP * \fBopen\fP (\fBconst\fP char *\fB__s\fP, \fBios_base::openmode\fP \fB__mode\fP)" .br .RI "Opens an external file\&. " .ti -1c .RI "\fB__filebuf_type\fP * \fBopen\fP (\fBconst\fP \fBstd::string\fP &\fB__s\fP, \fBios_base::openmode\fP \fB__mode\fP)" .br .RI "Opens an external file\&. " .ti -1c .RI "\fBbasic_filebuf\fP & \fBoperator=\fP (\fBbasic_filebuf\fP &&)" .br .ti -1c .RI "\fBbasic_filebuf\fP & \fBoperator=\fP (\fBconst\fP \fBbasic_filebuf\fP &)=\fBdelete\fP" .br .ti -1c .RI "\fBlocale\fP \fBpubimbue\fP (\fBconst\fP \fBlocale\fP &\fB__loc\fP)" .br .RI "Entry point for imbue()\&. " .ti -1c .RI "int_type \fBsbumpc\fP ()" .br .RI "Getting the next character\&. " .ti -1c .RI "int_type \fBsgetc\fP ()" .br .RI "Getting the next character\&. " .ti -1c .RI "\fBstreamsize\fP \fBsgetn\fP (char_type *\fB__s\fP, \fBstreamsize\fP __n)" .br .RI "Entry point for xsgetn\&. " .ti -1c .RI "int_type \fBsnextc\fP ()" .br .RI "Getting the next character\&. " .ti -1c .RI "int_type \fBsputbackc\fP (char_type __c)" .br .RI "Pushing characters back into the input stream\&. " .ti -1c .RI "int_type \fBsputc\fP (char_type __c)" .br .RI "Entry point for all single-character output functions\&. " .ti -1c .RI "\fBstreamsize\fP \fBsputn\fP (\fBconst\fP char_type *\fB__s\fP, \fBstreamsize\fP __n)" .br .RI "Entry point for all single-character output functions\&. " .ti -1c .RI "int_type \fBsungetc\fP ()" .br .RI "Moving backwards in the input stream\&. " .ti -1c .RI "\fBvoid\fP \fBswap\fP (\fBbasic_filebuf\fP &)" .br .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBbasic_streambuf\fP * \fBpubsetbuf\fP (char_type *\fB__s\fP, \fBstreamsize\fP __n)" .br .RI "Entry points for derived buffer functions\&. " .ti -1c .RI "pos_type \fBpubseekoff\fP (off_type \fB__off\fP, \fBios_base::seekdir\fP \fB__way\fP, \fBios_base::openmode\fP \fB__mode\fP=\fBios_base::in\fP|\fBios_base::out\fP)" .br .RI "Alters the stream position\&. " .ti -1c .RI "pos_type \fBpubseekpos\fP (pos_type \fB__sp\fP, \fBios_base::openmode\fP \fB__mode\fP=\fBios_base::in\fP|\fBios_base::out\fP)" .br .RI "Alters the stream position\&. " .ti -1c .RI "int \fBpubsync\fP ()" .br .RI "Calls virtual sync function\&. " .in -1c .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fBvoid\fP \fB__safe_gbump\fP (\fBstreamsize\fP __n)" .br .ti -1c .RI "\fBvoid\fP \fB__safe_pbump\fP (\fBstreamsize\fP __n)" .br .ti -1c .RI "\fBvoid\fP \fB_M_allocate_internal_buffer\fP ()" .br .ti -1c .RI "bool \fB_M_convert_to_external\fP (char_type *, \fBstreamsize\fP)" .br .ti -1c .RI "\fBvoid\fP \fB_M_create_pback\fP ()" .br .ti -1c .RI "\fBvoid\fP \fB_M_destroy_internal_buffer\fP () throw ()" .br .ti -1c .RI "\fBvoid\fP \fB_M_destroy_pback\fP () throw ()" .br .ti -1c .RI "int \fB_M_get_ext_pos\fP (__state_type &\fB__state\fP)" .br .ti -1c .RI "pos_type \fB_M_seek\fP (off_type \fB__off\fP, \fBios_base::seekdir\fP \fB__way\fP, __state_type \fB__state\fP)" .br .ti -1c .RI "\fBvoid\fP \fB_M_set_buffer\fP (\fBstreamsize\fP \fB__off\fP)" .br .ti -1c .RI "bool \fB_M_terminate_output\fP ()" .br .ti -1c .RI "\fBvoid\fP \fBgbump\fP (int __n)" .br .RI "Moving the read position\&. " .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBimbue\fP (\fBconst\fP \fBlocale\fP &\fB__loc\fP __attribute__((\fB__unused__\fP)))" .br .RI "Changes translations\&. " .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBimbue\fP (\fBconst\fP \fBlocale\fP &\fB__loc\fP)" .br .ti -1c .RI "\fBvirtual\fP int_type \fBoverflow\fP (int_type __c __attribute__((\fB__unused__\fP))=traits_type::eof())" .br .RI "Consumes data from the buffer; writes to the controlled sequence\&. " .ti -1c .RI "\fBvirtual\fP int_type \fBoverflow\fP (int_type __c=_Traits::eof())" .br .ti -1c .RI "\fBvirtual\fP int_type \fBpbackfail\fP (int_type __c __attribute__((\fB__unused__\fP))=traits_type::eof())" .br .RI "Tries to back up the input sequence\&. " .ti -1c .RI "\fBvirtual\fP int_type \fBpbackfail\fP (int_type __c=_Traits::eof())" .br .ti -1c .RI "\fBvoid\fP \fBpbump\fP (int __n)" .br .RI "Moving the write position\&. " .ti -1c .RI "\fBvirtual\fP pos_type \fBseekoff\fP (off_type \fB__off\fP, \fBios_base::seekdir\fP \fB__way\fP, \fBios_base::openmode\fP \fB__mode\fP=\fBios_base::in\fP|\fBios_base::out\fP)" .br .RI "Alters the stream positions\&. " .ti -1c .RI "\fBvirtual\fP pos_type \fBseekpos\fP (pos_type \fB__pos\fP, \fBios_base::openmode\fP \fB__mode\fP=\fBios_base::in\fP|\fBios_base::out\fP)" .br .RI "Alters the stream positions\&. " .ti -1c .RI "\fBvirtual\fP \fB__streambuf_type\fP * \fBsetbuf\fP (char_type *\fB__s\fP, \fBstreamsize\fP __n)" .br .RI "Manipulates the buffer\&. " .ti -1c .RI "\fBvoid\fP \fBsetg\fP (char_type *\fB__gbeg\fP, char_type *\fB__gnext\fP, char_type *\fB__gend\fP)" .br .RI "Setting the three read area pointers\&. " .ti -1c .RI "\fBvoid\fP \fBsetp\fP (char_type *\fB__pbeg\fP, char_type *\fB__pend\fP)" .br .RI "Setting the three write area pointers\&. " .ti -1c .RI "\fBvirtual\fP \fBstreamsize\fP \fBshowmanyc\fP ()" .br .RI "Investigating the data available\&. " .ti -1c .RI "\fBvoid\fP \fBswap\fP (\fBbasic_streambuf\fP &\fB__sb\fP)" .br .ti -1c .RI "\fBvirtual\fP int \fBsync\fP ()" .br .RI "Synchronizes the buffer arrays with the controlled sequences\&. " .ti -1c .RI "\fBvirtual\fP int_type \fBuflow\fP ()" .br .RI "Fetches more data from the controlled sequence\&. " .ti -1c .RI "\fBvirtual\fP int_type \fBunderflow\fP ()" .br .RI "Fetches more data from the controlled sequence\&. " .ti -1c .RI "\fBvirtual\fP \fBstreamsize\fP \fBxsgetn\fP (char_type *\fB__s\fP, \fBstreamsize\fP __n)" .br .RI "Multiple character extraction\&. " .ti -1c .RI "\fBvirtual\fP \fBstreamsize\fP \fBxsputn\fP (\fBconst\fP char_type *\fB__s\fP, \fBstreamsize\fP __n)" .br .RI "Multiple character insertion\&. " .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "char_type * \fBeback\fP () \fBconst\fP" .br .RI "Access to the get area\&. " .ti -1c .RI "char_type * \fBgptr\fP () \fBconst\fP" .br .RI "Access to the get area\&. " .ti -1c .RI "char_type * \fBegptr\fP () \fBconst\fP" .br .RI "Access to the get area\&. " .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "char_type * \fBpbase\fP () \fBconst\fP" .br .RI "Access to the put area\&. " .ti -1c .RI "char_type * \fBpptr\fP () \fBconst\fP" .br .RI "Access to the put area\&. " .ti -1c .RI "char_type * \fBepptr\fP () \fBconst\fP" .br .RI "Access to the put area\&. " .in -1c .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "char_type * \fB_M_buf\fP" .br .RI "Pointer to the beginning of internal buffer\&. " .ti -1c .RI "bool \fB_M_buf_allocated\fP" .br .ti -1c .RI "\fBlocale\fP \fB_M_buf_locale\fP" .br .RI "Current locale setting\&. " .ti -1c .RI "size_t \fB_M_buf_size\fP" .br .ti -1c .RI "\fBconst\fP \fB__codecvt_type\fP * \fB_M_codecvt\fP" .br .ti -1c .RI "char * \fB_M_ext_buf\fP" .br .ti -1c .RI "\fBstreamsize\fP \fB_M_ext_buf_size\fP" .br .ti -1c .RI "char * \fB_M_ext_end\fP" .br .ti -1c .RI "\fBconst\fP char * \fB_M_ext_next\fP" .br .ti -1c .RI "__file_type \fB_M_file\fP" .br .ti -1c .RI "char_type * \fB_M_in_beg\fP" .br .RI "Start of get area\&. " .ti -1c .RI "char_type * \fB_M_in_cur\fP" .br .RI "Current read area\&. " .ti -1c .RI "char_type * \fB_M_in_end\fP" .br .RI "End of get area\&. " .ti -1c .RI "__c_lock \fB_M_lock\fP" .br .ti -1c .RI "\fBios_base::openmode\fP \fB_M_mode\fP" .br .RI "Place to stash in || out || in | out settings for current filebuf\&. " .ti -1c .RI "char_type * \fB_M_out_beg\fP" .br .RI "Start of put area\&. " .ti -1c .RI "char_type * \fB_M_out_cur\fP" .br .RI "Current put area\&. " .ti -1c .RI "char_type * \fB_M_out_end\fP" .br .RI "End of put area\&. " .ti -1c .RI "bool \fB_M_reading\fP" .br .ti -1c .RI "__state_type \fB_M_state_beg\fP" .br .ti -1c .RI "__state_type \fB_M_state_cur\fP" .br .ti -1c .RI "__state_type \fB_M_state_last\fP" .br .ti -1c .RI "bool \fB_M_writing\fP" .br .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "char_type \fB_M_pback\fP" .br .ti -1c .RI "char_type * \fB_M_pback_cur_save\fP" .br .ti -1c .RI "char_type * \fB_M_pback_end_save\fP" .br .ti -1c .RI "bool \fB_M_pback_init\fP" .br .in -1c .in -1c .SS "Friends" .in +1c .ti -1c .RI "\fBclass\fP \fBios_base\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template<\fBtypename\fP _CharT, \fBtypename\fP _Traits> .br class std::basic_filebuf< _CharT, _Traits >"The actual work of input and output (for files)\&. .PP \fBTemplate Parameters\fP .RS 4 \fI_CharT\fP Type of character stream\&. .br \fI_Traits\fP Traits for character type, defaults to char_traits<_CharT>\&. .RE .PP This class associates both its input and output sequence with an external disk file, and maintains a joint file position for both sequences\&. Many of its semantics are described in terms of similar behavior in the Standard C Library's \fCFILE\fP streams\&. .PP Requirements on traits_type, specific to this class: .IP "\(bu" 2 traits_type::pos_type must be fpos .IP "\(bu" 2 traits_type::off_type must be streamoff .IP "\(bu" 2 traits_type::state_type must be Assignable and DefaultConstructible, .IP "\(bu" 2 traits_type::state_type() must be the initial state for codecvt\&. .PP .PP Definition at line \fB80\fP of file \fBfstream\fP\&. .SH "Member Typedef Documentation" .PP .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBtypedef\fP \fBcodecvt\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::__codecvt_type" .PP Definition at line \fB108\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBtypedef\fP __basic_file \fBstd::basic_filebuf\fP< _CharT, _Traits >::__file_type" .PP Definition at line \fB106\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBtypedef\fP \fBbasic_filebuf\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::__filebuf_type" .PP Definition at line \fB105\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBtypedef\fP traits_type::state_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::__state_type" .PP Definition at line \fB107\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBtypedef\fP \fBbasic_streambuf\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::__streambuf_type" .PP Definition at line \fB104\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBtypedef\fP _CharT \fBstd::basic_filebuf\fP< _CharT, _Traits >::char_type" .PP Definition at line \fB98\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBtypedef\fP traits_type::int_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::int_type" .PP Definition at line \fB100\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBtypedef\fP traits_type::off_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::off_type" .PP Definition at line \fB102\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBtypedef\fP traits_type::pos_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::pos_type" .PP Definition at line \fB101\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBtypedef\fP _Traits \fBstd::basic_filebuf\fP< _CharT, _Traits >::traits_type" .PP Definition at line \fB99\fP of file \fBfstream\fP\&. .SH "Constructor & Destructor Documentation" .PP .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBstd::basic_filebuf\fP< _CharT, _Traits >::basic_filebuf ()" .PP Does not open any files\&. The default constructor initializes the parent class using its own default ctor\&. .PP Definition at line \fB80\fP of file \fBfstream\&.tcc\fP\&. .PP References \fBstd::basic_streambuf< _CharT, _Traits >::_M_buf_locale\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBstd::basic_filebuf\fP< _CharT, _Traits >::basic_filebuf (\fBbasic_filebuf\fP< _CharT, _Traits > && __rhs)" .PP Definition at line \fB95\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvirtual\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::~\fBbasic_filebuf\fP ()\fC [inline]\fP, \fC [virtual]\fP" .PP The destructor closes the file first\&. .PP Definition at line \fB246\fP of file \fBfstream\fP\&. .SH "Member Function Documentation" .PP .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::__safe_gbump (\fBstreamsize\fP __n)\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Definition at line \fB802\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::__safe_pbump (\fBstreamsize\fP __n)\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Definition at line \fB805\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_allocate_internal_buffer ()\fC [protected]\fP" .PP Definition at line \fB49\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > bool \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_convert_to_external (char_type * __ibuf, \fBstreamsize\fP __ilen)\fC [protected]\fP" .PP Definition at line \fB606\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_create_pback ()\fC [inline]\fP, \fC [protected]\fP" Initializes pback buffers, and moves normal buffers to safety\&. Assumptions: _M_in_cur has already been moved back .PP Definition at line \fB199\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_destroy_internal_buffer ()\fC [protected]\fP" .PP Definition at line \fB63\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_destroy_pback ()\fC [inline]\fP, \fC [protected]\fP" Deactivates pback buffer contents, and restores normal buffer\&. Assumptions: The pback buffer has only moved forward\&. .PP Definition at line \fB216\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > int \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_get_ext_pos (__state_type & __state)\fC [protected]\fP" .PP Definition at line \fB932\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBbasic_filebuf\fP< _CharT, _Traits >::pos_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_seek (off_type __off, \fBios_base::seekdir\fP __way, __state_type __state)\fC [protected]\fP" .PP Definition at line \fB907\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_set_buffer (\fBstreamsize\fP __off)\fC [inline]\fP, \fC [protected]\fP" This function sets the pointers of the internal buffer, both get and put areas\&. Typically: .PP __off == egptr() - eback() upon underflow/uflow (\fBread\fP mode); __off == 0 upon overflow (\fBwrite\fP mode); __off == -1 upon open, setbuf, seekoff/pos (\fBuncommitted\fP mode)\&. .PP 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\&. .PP Definition at line \fB459\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > bool \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_terminate_output ()\fC [protected]\fP" .PP Definition at line \fB951\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBbasic_filebuf\fP< _CharT, _Traits >::__filebuf_type * \fBstd::basic_filebuf\fP< _CharT, _Traits >::close ()" .PP Closes the currently associated file\&. .PP \fBReturns\fP .RS 4 \fCthis\fP on success, NULL on failure .RE .PP If no file is currently open, this function immediately fails\&. .PP If a \fIput buffer area\fP exists, \fCoverflow(eof)\fP is called to flush all the characters\&. The file is then closed\&. .PP If any operations fail, this function also fails\&. .PP Definition at line \fB249\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type * \fBstd::basic_streambuf\fP< _CharT, _Traits >::eback () const\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Access to the get area\&. These functions are only available to other protected functions, including derived classes\&. .PP .IP "\(bu" 2 eback() returns the beginning pointer for the input sequence .IP "\(bu" 2 gptr() returns the next pointer for the input sequence .IP "\(bu" 2 egptr() returns the end pointer for the input sequence .PP .PP Definition at line \fB489\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type * \fBstd::basic_streambuf\fP< _CharT, _Traits >::egptr () const\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Access to the get area\&. These functions are only available to other protected functions, including derived classes\&. .PP .IP "\(bu" 2 eback() returns the beginning pointer for the input sequence .IP "\(bu" 2 gptr() returns the next pointer for the input sequence .IP "\(bu" 2 egptr() returns the end pointer for the input sequence .PP .PP Definition at line \fB495\fP of file \fBstreambuf\fP\&. .PP Referenced by \fBstd::wbuffer_convert< _Codecvt, _Elem, _Tr >::underflow()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type * \fBstd::basic_streambuf\fP< _CharT, _Traits >::epptr () const\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Access to the put area\&. These functions are only available to other protected functions, including derived classes\&. .PP .IP "\(bu" 2 pbase() returns the beginning pointer for the output sequence .IP "\(bu" 2 pptr() returns the next pointer for the output sequence .IP "\(bu" 2 epptr() returns the end pointer for the output sequence .PP .PP Definition at line \fB542\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::gbump (int __n)\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Moving the read position\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The delta by which to move\&. .RE .PP This just advances the read position without returning any data\&. .PP Definition at line \fB505\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBlocale\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::getloc () const\fC [inline]\fP, \fC [inherited]\fP" .PP Locale access\&. .PP \fBReturns\fP .RS 4 The current locale in effect\&. .RE .PP If pubimbue(loc) has been called, then the most recent \fCloc\fP is returned\&. Otherwise the global locale in effect at the time of construction is returned\&. .PP Definition at line \fB233\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type * \fBstd::basic_streambuf\fP< _CharT, _Traits >::gptr () const\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Access to the get area\&. These functions are only available to other protected functions, including derived classes\&. .PP .IP "\(bu" 2 eback() returns the beginning pointer for the input sequence .IP "\(bu" 2 gptr() returns the next pointer for the input sequence .IP "\(bu" 2 egptr() returns the end pointer for the input sequence .PP .PP Definition at line \fB492\fP of file \fBstreambuf\fP\&. .PP Referenced by \fBstd::wbuffer_convert< _Codecvt, _Elem, _Tr >::underflow()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvirtual\fP \fBvoid\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::imbue (\fBconst\fP \fBlocale\fP &\fB__loc\fP __attribute__(__unused__))\fC [inline]\fP, \fC [protected]\fP, \fC [virtual]\fP, \fC [inherited]\fP" .PP Changes translations\&. .PP \fBParameters\fP .RS 4 \fI__loc\fP A new locale\&. .RE .PP Translations done during I/O which depend on the current locale are changed by this call\&. The standard adds, \fIBetween invocations of this function a class derived from streambuf can safely cache results of calls to locale functions and to members of facets so obtained\&.\fP .PP \fBNote\fP .RS 4 Base class version does nothing\&. .RE .PP .PP Definition at line \fB583\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::imbue (\fBconst\fP \fBlocale\fP & __loc)\fC [protected]\fP, \fC [virtual]\fP" .PP Definition at line \fB1029\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBstreamsize\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::in_avail ()\fC [inline]\fP, \fC [inherited]\fP" .PP Looking ahead into the stream\&. .PP \fBReturns\fP .RS 4 The number of characters available\&. .RE .PP If a read position is available, returns the number of characters available for reading before the buffer must be refilled\&. Otherwise returns the derived \fCshowmanyc()\fP\&. .PP Definition at line \fB291\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > bool \fBstd::basic_filebuf\fP< _CharT, _Traits >::is_open () const\fC [inline]\fP" .PP Returns true if the external file is open\&. .PP Definition at line \fB265\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBbasic_filebuf\fP< _CharT, _Traits >::__filebuf_type * \fBstd::basic_filebuf\fP< _CharT, _Traits >::open (\fBconst\fP char * __s, \fBios_base::openmode\fP __mode)" .PP Opens an external file\&. .PP \fBParameters\fP .RS 4 \fI__s\fP The name of the file\&. .br \fI__mode\fP The open mode flags\&. .RE .PP \fBReturns\fP .RS 4 \fCthis\fP on success, NULL on failure .RE .PP If a file is already open, this function immediately fails\&. Otherwise it tries to open the file named \fI__s\fP using the flags given in \fI__mode\fP\&. .PP Table 92, adapted here, gives the relation between openmode combinations and the equivalent \fCfopen()\fP flags\&. (NB: lines app, in|out|app, in|app, binary|app, binary|in|out|app, and binary|in|app per DR 596) .PP .nf +---------------------------------------------------------+ | 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 | +---------------------------------------------------------+ .fi .PP .PP Definition at line \fB179\fP of file \fBfstream\&.tcc\fP\&. .PP References \fBstd::ios_base::ate\fP, and \fBstd::ios_base::end\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fB__filebuf_type\fP * \fBstd::basic_filebuf\fP< _CharT, _Traits >::open (\fBconst\fP \fBstd::string\fP & __s, \fBios_base::openmode\fP __mode)\fC [inline]\fP" .PP Opens an external file\&. .PP \fBParameters\fP .RS 4 \fI__s\fP The name of the file\&. .br \fI__mode\fP The open mode flags\&. .RE .PP \fBReturns\fP .RS 4 \fCthis\fP on success, NULL on failure .RE .PP .PP Definition at line \fB331\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBbasic_filebuf\fP< _CharT, _Traits > & \fBstd::basic_filebuf\fP< _CharT, _Traits >::operator= (\fBbasic_filebuf\fP< _CharT, _Traits > && __rhs)" .PP Definition at line \fB124\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvirtual\fP int_type \fBstd::basic_streambuf\fP< _CharT, _Traits >::overflow (\fBint_type\fP __c __attribute__(__unused__) = \fCtraits_type::eof()\fP)\fC [inline]\fP, \fC [protected]\fP, \fC [virtual]\fP, \fC [inherited]\fP" .PP Consumes data from the buffer; writes to the controlled sequence\&. .PP \fBParameters\fP .RS 4 \fI__c\fP An additional character to consume\&. .RE .PP \fBReturns\fP .RS 4 eof() to indicate failure, something else (usually \fI__c\fP, or not_eof()) .RE .PP Informally, this function is called when the output buffer is full (or does not exist, as buffering need not actually be done)\&. If a buffer exists, it is \fIconsumed\fP, with \fIsome effect\fP on the controlled sequence\&. (Typically, the buffer is written out to the sequence verbatim\&.) In either case, the character \fIc\fP is also written out, if \fI__c\fP is not \fCeof()\fP\&. .PP For a formal definition of this function, see a good text such as Langer & Kreft, or [27\&.5\&.2\&.4\&.5]/3-7\&. .PP A functioning output streambuf can be created by overriding only this function (no buffer area will be used)\&. .PP \fBNote\fP .RS 4 Base class version does nothing, returns eof()\&. .RE .PP .PP Definition at line \fB775\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBbasic_filebuf\fP< _CharT, _Traits >::int_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::overflow (int_type __c = \fC_Traits::eof()\fP)\fC [protected]\fP, \fC [virtual]\fP" .PP Definition at line \fB541\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvirtual\fP int_type \fBstd::basic_streambuf\fP< _CharT, _Traits >::pbackfail (\fBint_type\fP __c __attribute__(__unused__) = \fCtraits_type::eof()\fP)\fC [inline]\fP, \fC [protected]\fP, \fC [virtual]\fP, \fC [inherited]\fP" .PP Tries to back up the input sequence\&. .PP \fBParameters\fP .RS 4 \fI__c\fP The character to be inserted back into the sequence\&. .RE .PP \fBReturns\fP .RS 4 eof() on failure, \fIsome other value\fP on success .RE .PP \fBPostcondition\fP .RS 4 The constraints of \fCgptr()\fP, \fCeback()\fP, and \fCpptr()\fP are the same as for \fCunderflow()\fP\&. .RE .PP \fBNote\fP .RS 4 Base class version does nothing, returns eof()\&. .RE .PP .PP Definition at line \fB731\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBbasic_filebuf\fP< _CharT, _Traits >::int_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::pbackfail (int_type __c = \fC_Traits::eof()\fP)\fC [protected]\fP, \fC [virtual]\fP" .PP Definition at line \fB482\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type * \fBstd::basic_streambuf\fP< _CharT, _Traits >::pbase () const\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Access to the put area\&. These functions are only available to other protected functions, including derived classes\&. .PP .IP "\(bu" 2 pbase() returns the beginning pointer for the output sequence .IP "\(bu" 2 pptr() returns the next pointer for the output sequence .IP "\(bu" 2 epptr() returns the end pointer for the output sequence .PP .PP Definition at line \fB536\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::pbump (int __n)\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Moving the write position\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The delta by which to move\&. .RE .PP This just advances the write position without returning any data\&. .PP Definition at line \fB552\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type * \fBstd::basic_streambuf\fP< _CharT, _Traits >::pptr () const\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Access to the put area\&. These functions are only available to other protected functions, including derived classes\&. .PP .IP "\(bu" 2 pbase() returns the beginning pointer for the output sequence .IP "\(bu" 2 pptr() returns the next pointer for the output sequence .IP "\(bu" 2 epptr() returns the end pointer for the output sequence .PP .PP Definition at line \fB539\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBlocale\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::pubimbue (\fBconst\fP \fBlocale\fP & __loc)\fC [inline]\fP, \fC [inherited]\fP" .PP Entry point for imbue()\&. .PP \fBParameters\fP .RS 4 \fI__loc\fP The new locale\&. .RE .PP \fBReturns\fP .RS 4 The previous locale\&. .RE .PP Calls the derived imbue(__loc)\&. .PP Definition at line \fB216\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > pos_type \fBstd::basic_streambuf\fP< _CharT, _Traits >::pubseekoff (\fBoff_type\fP __off, \fBios_base::seekdir\fP __way, \fBios_base::openmode\fP __mode = \fC\fBios_base::in\fP | \fBios_base::out\fP\fP)\fC [inline]\fP, \fC [inherited]\fP" .PP Alters the stream position\&. .PP \fBParameters\fP .RS 4 \fI__off\fP Offset\&. .br \fI__way\fP Value for ios_base::seekdir\&. .br \fI__mode\fP Value for ios_base::openmode\&. .RE .PP Calls virtual seekoff function\&. .PP Definition at line \fB258\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > pos_type \fBstd::basic_streambuf\fP< _CharT, _Traits >::pubseekpos (\fBpos_type\fP __sp, \fBios_base::openmode\fP __mode = \fC\fBios_base::in\fP | \fBios_base::out\fP\fP)\fC [inline]\fP, \fC [inherited]\fP" .PP Alters the stream position\&. .PP \fBParameters\fP .RS 4 \fI__sp\fP Position .br \fI__mode\fP Value for ios_base::openmode\&. .RE .PP Calls virtual seekpos function\&. .PP Definition at line \fB270\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBbasic_streambuf\fP * \fBstd::basic_streambuf\fP< _CharT, _Traits >::pubsetbuf (\fBchar_type\fP * __s, \fBstreamsize\fP __n)\fC [inline]\fP, \fC [inherited]\fP" .PP Entry points for derived buffer functions\&. The public versions of \fCpubfoo\fP dispatch to the protected derived \fCfoo\fP member functions, passing the arguments (if any) and returning the result unchanged\&. .PP Definition at line \fB246\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > int \fBstd::basic_streambuf\fP< _CharT, _Traits >::pubsync ()\fC [inline]\fP, \fC [inherited]\fP" .PP Calls virtual sync function\&. .PP Definition at line \fB278\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > int_type \fBstd::basic_streambuf\fP< _CharT, _Traits >::sbumpc ()\fC [inline]\fP, \fC [inherited]\fP" .PP Getting the next character\&. .PP \fBReturns\fP .RS 4 The next character, or eof\&. .RE .PP If the input read position is available, returns that character and increments the read pointer, otherwise calls and returns \fCuflow()\fP\&. .PP Definition at line \fB323\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBbasic_filebuf\fP< _CharT, _Traits >::pos_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::seekoff (off_type, \fBios_base::seekdir\fP, \fBios_base::openmode\fP = \fC\fBios_base::in\fP | \fBios_base::out\fP\fP)\fC [protected]\fP, \fC [virtual]\fP" .PP Alters the stream positions\&. Each derived class provides its own appropriate behavior\&. .PP \fBNote\fP .RS 4 Base class version does nothing, returns a \fCpos_type\fP that represents an invalid stream position\&. .RE .PP .PP Reimplemented from \fBstd::basic_streambuf< _CharT, _Traits >\fP\&. .PP Definition at line \fB832\fP of file \fBfstream\&.tcc\fP\&. .PP References \fBstd::ios_base::cur\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBbasic_filebuf\fP< _CharT, _Traits >::pos_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::seekpos (pos_type, \fBios_base::openmode\fP = \fC\fBios_base::in\fP | \fBios_base::out\fP\fP)\fC [protected]\fP, \fC [virtual]\fP" .PP Alters the stream positions\&. Each derived class provides its own appropriate behavior\&. .PP \fBNote\fP .RS 4 Base class version does nothing, returns a \fCpos_type\fP that represents an invalid stream position\&. .RE .PP .PP Reimplemented from \fBstd::basic_streambuf< _CharT, _Traits >\fP\&. .PP Definition at line \fB892\fP of file \fBfstream\&.tcc\fP\&. .PP References \fBstd::ios_base::beg\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBbasic_filebuf\fP< _CharT, _Traits >::__streambuf_type * \fBstd::basic_filebuf\fP< _CharT, _Traits >::setbuf (char_type * __s, \fBstreamsize\fP __n)\fC [protected]\fP, \fC [virtual]\fP" .PP Manipulates the buffer\&. .PP \fBParameters\fP .RS 4 \fI__s\fP Pointer to a buffer area\&. .br \fI__n\fP Size of \fI__s\fP\&. .RE .PP \fBReturns\fP .RS 4 \fCthis\fP .RE .PP If no file has been opened, and both \fI__s\fP and \fI__n\fP are zero, then the stream becomes unbuffered\&. Otherwise, \fC__s\fP is used as a buffer; see https://gcc.gnu.org/onlinedocs/libstdc++/manual/streambufs.html#io.streambuf.buffering for more\&. .PP Reimplemented from \fBstd::basic_streambuf< _CharT, _Traits >\fP\&. .PP Definition at line \fB803\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::setg (\fBchar_type\fP * __gbeg, \fBchar_type\fP * __gnext, \fBchar_type\fP * __gend)\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Setting the three read area pointers\&. .PP \fBParameters\fP .RS 4 \fI__gbeg\fP A pointer\&. .br \fI__gnext\fP A pointer\&. .br \fI__gend\fP A pointer\&. .RE .PP \fBPostcondition\fP .RS 4 \fI__gbeg\fP == \fCeback()\fP, \fI__gnext\fP == \fCgptr()\fP, and \fI__gend\fP == \fCegptr()\fP .RE .PP .PP Definition at line \fB516\fP of file \fBstreambuf\fP\&. .PP Referenced by \fBstd::wbuffer_convert< _Codecvt, _Elem, _Tr >::wbuffer_convert()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::setp (\fBchar_type\fP * __pbeg, \fBchar_type\fP * __pend)\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Setting the three write area pointers\&. .PP \fBParameters\fP .RS 4 \fI__pbeg\fP A pointer\&. .br \fI__pend\fP A pointer\&. .RE .PP \fBPostcondition\fP .RS 4 \fI__pbeg\fP == \fCpbase()\fP, \fI__pbeg\fP == \fCpptr()\fP, and \fI__pend\fP == \fCepptr()\fP .RE .PP .PP Definition at line \fB562\fP of file \fBstreambuf\fP\&. .PP Referenced by \fBstd::wbuffer_convert< _Codecvt, _Elem, _Tr >::wbuffer_convert()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > int_type \fBstd::basic_streambuf\fP< _CharT, _Traits >::sgetc ()\fC [inline]\fP, \fC [inherited]\fP" .PP Getting the next character\&. .PP \fBReturns\fP .RS 4 The next character, or eof\&. .RE .PP If the input read position is available, returns that character, otherwise calls and returns \fCunderflow()\fP\&. Does not move the read position after fetching the character\&. .PP Definition at line \fB345\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBstreamsize\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::sgetn (\fBchar_type\fP * __s, \fBstreamsize\fP __n)\fC [inline]\fP, \fC [inherited]\fP" .PP Entry point for xsgetn\&. .PP \fBParameters\fP .RS 4 \fI__s\fP A buffer area\&. .br \fI__n\fP A count\&. .RE .PP Returns xsgetn(__s,__n)\&. The effect is to fill \fI__s\fP[0] through \fI__s\fP[__n-1] with characters from the input sequence, if possible\&. .PP Definition at line \fB364\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBstreamsize\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::showmanyc ()\fC [protected]\fP, \fC [virtual]\fP" .PP Investigating the data available\&. .PP \fBReturns\fP .RS 4 An estimate of the number of characters available in the input sequence, or -1\&. .RE .PP \fIIf it returns a positive value, then successive calls to \fCunderflow()\fP will not return \fCtraits::eof()\fP until at least that number of characters have been supplied\&. If \fCshowmanyc()\fP returns -1, then calls to \fCunderflow()\fP or \fCuflow()\fP will fail\&.\fP [27\&.5\&.2\&.4\&.3]/1 .PP \fBNote\fP .RS 4 Base class version does nothing, returns zero\&. .PP The standard adds that \fIthe intention is not only that the calls [to underflow or uflow] will not return \fCeof()\fP but that they will return immediately\&.\fP .PP The standard adds that \fIthe morphemes of \fCshowmanyc\fP are \fBes-how-many-see\fP, not \fBshow-manic\fP\&.\fP .RE .PP .PP Reimplemented from \fBstd::basic_streambuf< _CharT, _Traits >\fP\&. .PP Definition at line \fB297\fP of file \fBfstream\&.tcc\fP\&. .PP References \fBstd::ios_base::in\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > int_type \fBstd::basic_streambuf\fP< _CharT, _Traits >::snextc ()\fC [inline]\fP, \fC [inherited]\fP" .PP Getting the next character\&. .PP \fBReturns\fP .RS 4 The next character, or eof\&. .RE .PP Calls \fCsbumpc()\fP, and if that function returns \fCtraits::eof()\fP, so does this function\&. Otherwise, \fCsgetc()\fP\&. .PP Definition at line \fB305\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > int_type \fBstd::basic_streambuf\fP< _CharT, _Traits >::sputbackc (\fBchar_type\fP __c)\fC [inline]\fP, \fC [inherited]\fP" .PP Pushing characters back into the input stream\&. .PP \fBParameters\fP .RS 4 \fI__c\fP The character to push back\&. .RE .PP \fBReturns\fP .RS 4 The previous character, if possible\&. .RE .PP Similar to sungetc(), but \fI__c\fP is pushed onto the stream instead of \fIthe previous character\&.\fP If successful, the next character fetched from the input stream will be \fI__c\fP\&. .PP Definition at line \fB379\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > int_type \fBstd::basic_streambuf\fP< _CharT, _Traits >::sputc (\fBchar_type\fP __c)\fC [inline]\fP, \fC [inherited]\fP" .PP Entry point for all single-character output functions\&. .PP \fBParameters\fP .RS 4 \fI__c\fP A character to output\&. .RE .PP \fBReturns\fP .RS 4 \fI__c\fP, if possible\&. .RE .PP One of two public output functions\&. .PP If a write position is available for the output sequence (i\&.e\&., the buffer is not full), stores \fI__c\fP in that position, increments the position, and returns \fCtraits::to_int_type(__c)\fP\&. If a write position is not available, returns \fCoverflow(__c)\fP\&. .PP Definition at line \fB431\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBstreamsize\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::sputn (\fBconst\fP \fBchar_type\fP * __s, \fBstreamsize\fP __n)\fC [inline]\fP, \fC [inherited]\fP" .PP Entry point for all single-character output functions\&. .PP \fBParameters\fP .RS 4 \fI__s\fP A buffer read area\&. .br \fI__n\fP A count\&. .RE .PP One of two public output functions\&. .PP Returns xsputn(__s,__n)\&. The effect is to write \fI__s\fP[0] through \fI__s\fP[__n-1] to the output sequence, if possible\&. .PP Definition at line \fB457\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > int_type \fBstd::basic_streambuf\fP< _CharT, _Traits >::sungetc ()\fC [inline]\fP, \fC [inherited]\fP" .PP Moving backwards in the input stream\&. .PP \fBReturns\fP .RS 4 The previous character, if possible\&. .RE .PP If a putback position is available, this function decrements the input pointer and returns that character\&. Otherwise, calls and returns pbackfail()\&. The effect is to \fIunget\fP the last character \fIgotten\fP\&. .PP Definition at line \fB404\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::swap (\fBbasic_filebuf\fP< _CharT, _Traits > & __rhs)" .PP Definition at line \fB153\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvoid\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::swap (\fBbasic_streambuf\fP< _CharT, _Traits > & __sb)\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Definition at line \fB819\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > int \fBstd::basic_filebuf\fP< _CharT, _Traits >::sync ()\fC [protected]\fP, \fC [virtual]\fP" .PP Synchronizes the buffer arrays with the controlled sequences\&. .PP \fBReturns\fP .RS 4 -1 on failure\&. .RE .PP Each derived class provides its own appropriate behavior, including the definition of \fIfailure\fP\&. .PP \fBNote\fP .RS 4 Base class version does nothing, returns zero\&. .RE .PP .PP Reimplemented from \fBstd::basic_streambuf< _CharT, _Traits >\fP\&. .PP Definition at line \fB1012\fP of file \fBfstream\&.tcc\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBvirtual\fP int_type \fBstd::basic_streambuf\fP< _CharT, _Traits >::uflow ()\fC [inline]\fP, \fC [protected]\fP, \fC [virtual]\fP, \fC [inherited]\fP" .PP Fetches more data from the controlled sequence\&. .PP \fBReturns\fP .RS 4 The first character from the \fIpending sequence\fP\&. .RE .PP Informally, this function does the same thing as \fCunderflow()\fP, and in fact is required to call that function\&. It also returns the new character, like \fCunderflow()\fP does\&. However, this function also moves the read position forward by one\&. .PP Reimplemented in \fB__gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >\fP\&. .PP Definition at line \fB707\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBbasic_filebuf\fP< _CharT, _Traits >::int_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::underflow ()\fC [protected]\fP, \fC [virtual]\fP" .PP Fetches more data from the controlled sequence\&. .PP \fBReturns\fP .RS 4 The first character from the \fIpending sequence\fP\&. .RE .PP Informally, this function is called when the input buffer is exhausted (or does not exist, as buffering need not actually be done)\&. If a buffer exists, it is \fIrefilled\fP\&. In either case, the next available character is returned, or \fCtraits::eof()\fP to indicate a null pending sequence\&. .PP For a formal definition of the pending sequence, see a good text such as Langer & Kreft, or [27\&.5\&.2\&.4\&.3]/7-14\&. .PP A functioning input streambuf can be created by overriding only this function (no buffer area will be used)\&. For an example, see https://gcc.gnu.org/onlinedocs/libstdc++/manual/streambufs.html .PP \fBNote\fP .RS 4 Base class version does nothing, returns eof()\&. .RE .PP .PP Reimplemented from \fBstd::basic_streambuf< _CharT, _Traits >\fP\&. .PP Definition at line \fB323\fP of file \fBfstream\&.tcc\fP\&. .PP References \fBstd::ios_base::in\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBstreamsize\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::xsgetn (char_type * __s, \fBstreamsize\fP __n)\fC [protected]\fP, \fC [virtual]\fP" .PP Multiple character extraction\&. .PP \fBParameters\fP .RS 4 \fI__s\fP A buffer area\&. .br \fI__n\fP Maximum number of characters to assign\&. .RE .PP \fBReturns\fP .RS 4 The number of characters assigned\&. .RE .PP Fills \fI__s\fP[0] through \fI__s\fP[__n-1] with characters from the input sequence, as if by \fCsbumpc()\fP\&. Stops when either \fI__n\fP characters have been copied, or when \fCtraits::eof()\fP would be copied\&. .PP It is expected that derived classes provide a more efficient implementation by overriding this definition\&. .PP Reimplemented from \fBstd::basic_streambuf< _CharT, _Traits >\fP\&. .PP Definition at line \fB669\fP of file \fBfstream\&.tcc\fP\&. .PP References \fBstd::ios_base::in\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBstreamsize\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::xsputn (\fBconst\fP char_type * __s, \fBstreamsize\fP __n)\fC [protected]\fP, \fC [virtual]\fP" .PP Multiple character insertion\&. .PP \fBParameters\fP .RS 4 \fI__s\fP A buffer area\&. .br \fI__n\fP Maximum number of characters to write\&. .RE .PP \fBReturns\fP .RS 4 The number of characters written\&. .RE .PP Writes \fI__s\fP[0] through \fI__s\fP[__n-1] to the output sequence, as if by \fCsputc()\fP\&. Stops when either \fIn\fP characters have been copied, or when \fCsputc()\fP would return \fCtraits::eof()\fP\&. .PP It is expected that derived classes provide a more efficient implementation by overriding this definition\&. .PP Reimplemented from \fBstd::basic_streambuf< _CharT, _Traits >\fP\&. .PP Definition at line \fB755\fP of file \fBfstream\&.tcc\fP\&. .PP References \fBstd::ios_base::app\fP, \fBstd::min()\fP, and \fBstd::ios_base::out\fP\&. .SH "Friends And Related Symbol Documentation" .PP .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > friend \fBclass\fP \fBios_base\fP\fC [friend]\fP" .PP Definition at line \fB110\fP of file \fBfstream\fP\&. .SH "Member Data Documentation" .PP .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type* \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_buf\fC [protected]\fP" .PP Pointer to the beginning of internal buffer\&. .PP Definition at line \fB136\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > bool \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_buf_allocated\fC [protected]\fP" .PP Definition at line \fB146\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBlocale\fP \fBstd::basic_streambuf\fP< _CharT, _Traits >::_M_buf_locale\fC [protected]\fP, \fC [inherited]\fP" .PP Current locale setting\&. .PP Definition at line \fB199\fP of file \fBstreambuf\fP\&. .PP Referenced by \fBstd::basic_filebuf< _CharT, _Traits >::basic_filebuf()\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > size_t \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_buf_size\fC [protected]\fP" 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\&. .PP Definition at line \fB143\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBconst\fP \fB__codecvt_type\fP* \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_codecvt\fC [protected]\fP" .PP Definition at line \fB171\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char* \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_ext_buf\fC [protected]\fP" Buffer for external characters\&. Used for input when codecvt::always_noconv() == false\&. When valid, this corresponds to eback()\&. .PP Definition at line \fB178\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBstreamsize\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_ext_buf_size\fC [protected]\fP" Size of buffer held by _M_ext_buf\&. .PP Definition at line \fB183\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char* \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_ext_end\fC [protected]\fP" .PP Definition at line \fB191\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBconst\fP char* \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_ext_next\fC [protected]\fP" 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()\&. .PP Definition at line \fB190\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > __file_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_file\fC [protected]\fP" .PP Definition at line \fB118\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type* \fBstd::basic_streambuf\fP< _CharT, _Traits >::_M_in_beg\fC [protected]\fP, \fC [inherited]\fP" .PP Start of get area\&. .PP Definition at line \fB191\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type* \fBstd::basic_streambuf\fP< _CharT, _Traits >::_M_in_cur\fC [protected]\fP, \fC [inherited]\fP" .PP Current read area\&. .PP Definition at line \fB192\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type* \fBstd::basic_streambuf\fP< _CharT, _Traits >::_M_in_end\fC [protected]\fP, \fC [inherited]\fP" .PP End of get area\&. .PP Definition at line \fB193\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > __c_lock \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_lock\fC [protected]\fP" .PP Definition at line \fB115\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > \fBios_base::openmode\fP \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_mode\fC [protected]\fP" .PP Place to stash in || out || in | out settings for current filebuf\&. .PP Definition at line \fB121\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type* \fBstd::basic_streambuf\fP< _CharT, _Traits >::_M_out_beg\fC [protected]\fP, \fC [inherited]\fP" .PP Start of put area\&. .PP Definition at line \fB194\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type* \fBstd::basic_streambuf\fP< _CharT, _Traits >::_M_out_cur\fC [protected]\fP, \fC [inherited]\fP" .PP Current put area\&. .PP Definition at line \fB195\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type* \fBstd::basic_streambuf\fP< _CharT, _Traits >::_M_out_end\fC [protected]\fP, \fC [inherited]\fP" .PP End of put area\&. .PP Definition at line \fB196\fP of file \fBstreambuf\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_pback\fC [protected]\fP" Necessary bits for putback buffer management\&. .PP \fBNote\fP .RS 4 pbacks of over one character are not currently supported\&. .RE .PP .PP Definition at line \fB164\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type* \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_pback_cur_save\fC [protected]\fP" Necessary bits for putback buffer management\&. .PP \fBNote\fP .RS 4 pbacks of over one character are not currently supported\&. .RE .PP .PP Definition at line \fB165\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > char_type* \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_pback_end_save\fC [protected]\fP" Necessary bits for putback buffer management\&. .PP \fBNote\fP .RS 4 pbacks of over one character are not currently supported\&. .RE .PP .PP Definition at line \fB166\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > bool \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_pback_init\fC [protected]\fP" Necessary bits for putback buffer management\&. .PP \fBNote\fP .RS 4 pbacks of over one character are not currently supported\&. .RE .PP .PP Definition at line \fB167\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > bool \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_reading\fC [protected]\fP" _M_reading == false && _M_writing == false for \fBuncommitted\fP mode; _M_reading == true for \fBread\fP mode; _M_writing == true for \fBwrite\fP mode; .PP NB: _M_reading == true && _M_writing == true is unused\&. .PP Definition at line \fB155\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > __state_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_state_beg\fC [protected]\fP" .PP Definition at line \fB124\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > __state_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_state_cur\fC [protected]\fP" .PP Definition at line \fB129\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > __state_type \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_state_last\fC [protected]\fP" .PP Definition at line \fB133\fP of file \fBfstream\fP\&. .SS "template<\fBtypename\fP _CharT , \fBtypename\fP _Traits > bool \fBstd::basic_filebuf\fP< _CharT, _Traits >::_M_writing\fC [protected]\fP" .PP Definition at line \fB156\fP of file \fBfstream\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.