#include <stdio_sync_filebuf.h>
Inheritance diagram for __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >:
Public Types | |
typedef _CharT | char_type |
typedef _Traits | traits_type |
typedef traits_type::int_type | int_type |
typedef traits_type::pos_type | pos_type |
typedef traits_type::off_type | off_type |
Public Member Functions | |
stdio_sync_filebuf (std::__c_file *__f) | |
std::__c_file *const | file () |
template<> | |
stdio_sync_filebuf< char >::int_type | syncgetc () |
template<> | |
stdio_sync_filebuf< char >::int_type | syncungetc (int_type __c) |
template<> | |
stdio_sync_filebuf< char >::int_type | syncputc (int_type __c) |
template<> | |
std::streamsize | xsgetn (char *__s, std::streamsize __n) |
template<> | |
std::streamsize | xsputn (const char *__s, std::streamsize __n) |
Protected Member Functions | |
int_type | syncgetc () |
int_type | syncungetc (int_type __c) |
int_type | syncputc (int_type __c) |
virtual int_type | underflow () |
Fetches more data from the controlled sequence. | |
virtual int_type | uflow () |
Fetches more data from the controlled sequence. | |
virtual int_type | pbackfail (int_type __c=traits_type::eof()) |
Tries to back up the input sequence. | |
virtual std::streamsize | xsgetn (char_type *__s, std::streamsize __n) |
Multiple character extraction. | |
virtual int_type | overflow (int_type __c=traits_type::eof()) |
Consumes data from the buffer; writes to the controlled sequence. | |
virtual std::streamsize | xsputn (const char_type *__s, std::streamsize __n) |
Multiple character insertion. | |
virtual int | sync () |
Synchronizes the buffer arrays with the controlled sequences. | |
virtual std::streampos | seekoff (std::streamoff __off, std::ios_base::seekdir __dir, std::ios_base::openmode=std::ios_base::in|std::ios_base::out) |
virtual std::streampos | seekpos (std::streampos __pos, std::ios_base::openmode __mode=std::ios_base::in|std::ios_base::out) |
Private Attributes | |
std::__c_file *const | _M_file |
int_type | _M_unget_buf |
Definition at line 51 of file stdio_sync_filebuf.h.
typedef _CharT __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::char_type |
These are standard types. They permit a standardized way of referring to names of (or names dependant on) the template parameters, which are specific to the implementation.
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 55 of file stdio_sync_filebuf.h.
typedef traits_type::int_type __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::int_type |
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 57 of file stdio_sync_filebuf.h.
typedef traits_type::off_type __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::off_type |
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 59 of file stdio_sync_filebuf.h.
typedef traits_type::pos_type __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::pos_type |
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 58 of file stdio_sync_filebuf.h.
typedef _Traits __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::traits_type |
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 56 of file stdio_sync_filebuf.h.
__gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::stdio_sync_filebuf | ( | std::__c_file * | __f | ) | [inline, explicit] |
Definition at line 71 of file stdio_sync_filebuf.h.
std::__c_file* const __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::file | ( | ) | [inline] |
Definition at line 83 of file stdio_sync_filebuf.h.
References __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_file.
virtual int_type __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::overflow | ( | int_type | __c = traits_type::eof() |
) | [inline, protected, virtual] |
Consumes data from the buffer; writes to the controlled sequence.
c | An additional character to consume. |
eof()
.For a formal definiton of this function, see a good text such as Langer & Kreft, or [27.5.2.4.5]/3-7.
A functioning output streambuf can be created by overriding only this function (no buffer area will be used).
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 136 of file stdio_sync_filebuf.h.
References __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_file, and __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::syncputc().
virtual int_type __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::pbackfail | ( | int_type | __c = traits_type::eof() |
) | [inline, protected, virtual] |
Tries to back up the input sequence.
c | The character to be inserted back into the sequence. |
gptr()
, eback()
, and pptr()
are the same as for underflow()
.Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 111 of file stdio_sync_filebuf.h.
References __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_unget_buf, and __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::syncungetc().
virtual std::streampos __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::seekoff | ( | std::streamoff | __off, | |
std::ios_base::seekdir | __dir, | |||
std::ios_base::openmode | = std::ios_base::in | std::ios_base::out | |||
) | [inline, protected, virtual] |
Definition at line 159 of file stdio_sync_filebuf.h.
References __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_file, std::ios_base::beg, and std::ios_base::cur.
Referenced by __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::seekpos().
virtual std::streampos __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::seekpos | ( | std::streampos | __pos, | |
std::ios_base::openmode | __mode = std::ios_base::in | std::ios_base::out | |||
) | [inline, protected, virtual] |
Definition at line 181 of file stdio_sync_filebuf.h.
References std::ios_base::beg, and __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::seekoff().
virtual int __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::sync | ( | ) | [inline, protected, virtual] |
Synchronizes the buffer arrays with the controlled sequences.
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 155 of file stdio_sync_filebuf.h.
References __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_file.
stdio_sync_filebuf< char >::int_type __gnu_cxx::stdio_sync_filebuf< char >::syncgetc | ( | ) | [inline] |
Definition at line 189 of file stdio_sync_filebuf.h.
References __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_file.
int_type __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::syncgetc | ( | ) | [protected] |
stdio_sync_filebuf< char >::int_type __gnu_cxx::stdio_sync_filebuf< char >::syncputc | ( | int_type | __c | ) | [inline] |
Definition at line 199 of file stdio_sync_filebuf.h.
References __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_file.
int_type __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::syncputc | ( | int_type | __c | ) | [protected] |
Referenced by __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::overflow().
stdio_sync_filebuf< char >::int_type __gnu_cxx::stdio_sync_filebuf< char >::syncungetc | ( | int_type | __c | ) | [inline] |
Definition at line 194 of file stdio_sync_filebuf.h.
References __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_file.
int_type __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::syncungetc | ( | int_type | __c | ) | [protected] |
virtual int_type __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::uflow | ( | ) | [inline, protected, virtual] |
Fetches more data from the controlled sequence.
underflow()
, and in fact is required to call that function. It also returns the new character, like underflow()
does. However, this function also moves the read position forward by one.
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 103 of file stdio_sync_filebuf.h.
References __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_unget_buf, and __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::syncgetc().
virtual int_type __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::underflow | ( | ) | [inline, protected, virtual] |
Fetches more data from the controlled sequence.
traits::eof()
to indicate a null pending sequence.For a formal definiton of the pending sequence, see a good text such as Langer & Kreft, or [27.5.2.4.3]/7-14.
A functioning input streambuf can be created by overriding only this function (no buffer area will be used). For an example, see http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#6
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Definition at line 96 of file stdio_sync_filebuf.h.
References __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::syncgetc(), and __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::syncungetc().
std::streamsize __gnu_cxx::stdio_sync_filebuf< char >::xsgetn | ( | char * | __s, | |
std::streamsize | __n | |||
) | [inline] |
Definition at line 204 of file stdio_sync_filebuf.h.
References __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_file, and __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_unget_buf.
virtual std::streamsize __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::xsgetn | ( | char_type * | __s, | |
std::streamsize | __n | |||
) | [protected, virtual] |
Multiple character extraction.
s | A buffer area. | |
n | Maximum number of characters to assign. |
sbumpc()
. Stops when either n characters have been copied, or when traits::eof()
would be copied.It is expected that derived classes provide a more efficient implementation by overriding this definition.
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
std::streamsize __gnu_cxx::stdio_sync_filebuf< char >::xsputn | ( | const char * | __s, | |
std::streamsize | __n | |||
) | [inline] |
Definition at line 216 of file stdio_sync_filebuf.h.
References __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_file.
virtual std::streamsize __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::xsputn | ( | const char_type * | __s, | |
std::streamsize | __n | |||
) | [protected, virtual] |
Multiple character insertion.
s | A buffer area. | |
n | Maximum number of characters to write. |
sputc()
. Stops when either n characters have been copied, or when sputc()
would return traits::eof()
.It is expected that derived classes provide a more efficient implementation by overriding this definition.
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
std::__c_file* const __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_file [private] |
Definition at line 63 of file stdio_sync_filebuf.h.
Referenced by __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::file(), __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::overflow(), __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::seekoff(), __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::sync(), __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::syncgetc(), __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::syncputc(), __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::syncungetc(), __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::xsgetn(), and __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::xsputn().
int_type __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::_M_unget_buf [private] |
Definition at line 67 of file stdio_sync_filebuf.h.
Referenced by __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::pbackfail(), __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::uflow(), and __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::xsgetn().