#include <row_buffer.h>
Inheritance diagram for rpa::augm_basic_streambuf< DerivStrmBuf >:
Public Types | |
typedef DerivStrmBuf::char_type | char_type |
typedef DerivStrmBuf::traits_type | traits_type |
typedef DerivStrmBuf::pos_type | pos_type |
typedef DerivStrmBuf::int_type | int_type |
Public Member Functions | |
bool | a_empty (void) const |
void | a_clear (void) |
bool | a_flush (std::basic_streambuf< char_type, traits_type > *aStrmBuf) |
Dumps the content to a std::ostream. Can be specialized. | |
Protected Member Functions | |
std::streamsize | flush_to_streambuf (std::basic_streambuf< char_type, traits_type > *__sbout) |
typedef DerivStrmBuf::char_type rpa::augm_basic_streambuf< DerivStrmBuf >::char_type |
Reimplemented in rpa::augm_basic_filebuf< DerivStrmBuf >.
typedef DerivStrmBuf::int_type rpa::augm_basic_streambuf< DerivStrmBuf >::int_type |
Reimplemented in rpa::augm_basic_filebuf< DerivStrmBuf >.
typedef DerivStrmBuf::pos_type rpa::augm_basic_streambuf< DerivStrmBuf >::pos_type |
Reimplemented in rpa::augm_basic_filebuf< DerivStrmBuf >.
typedef DerivStrmBuf::traits_type rpa::augm_basic_streambuf< DerivStrmBuf >::traits_type |
Reimplemented in rpa::augm_basic_filebuf< DerivStrmBuf >.
void rpa::augm_basic_streambuf< DerivStrmBuf >::a_clear | ( | void | ) | [inline] |
Note that 'clear' is called before 'begout', at first use. Called prior to using it as an output buffer without size limit. Beware that it is not called for limited-size buffer. Therefore, it is not only here that we should empty the buffer.
At opening, the file position is at the beginning, so it is unnecessary to clean it before its first use with 'begout'. We could maybe avoid one call.
This is maybe a pure IO problem. We should display errno too.
Reimplemented in rpa::augm_basic_filebuf< DerivStrmBuf >.
bool rpa::augm_basic_streambuf< DerivStrmBuf >::a_empty | ( | void | ) | const [inline] |
Reimplemented in rpa::augm_basic_filebuf< DerivStrmBuf >.
bool rpa::augm_basic_streambuf< DerivStrmBuf >::a_flush | ( | std::basic_streambuf< char_type, traits_type > * | aStrmBuf | ) | [inline] |
Dumps the content to a std::ostream. Can be specialized.
Now we can call a function which knows nothing about the class DerivStrmBuf, because all it uses are virtuals.
std::streamsize rpa::augm_basic_streambuf< DerivStrmBuf >::flush_to_streambuf | ( | std::basic_streambuf< char_type, traits_type > * | __sbout | ) | [inline, protected] |
Adapted from __copy_streambufs bits/streambuf.tcc in g++. "As this member seems to use only standard members, it should be possible to reimplement it with any STL implementation. Conceivably, this could be used to implement buffer-to-buffer copies, if this was ever desired in an un-ambiguous way by the standard. If so, then checks for __ios being zero would be necessary."
Position of last write : Where we are now. This is also the number of chars we must write to the output.
Back to the beginning
Maybe we reached the end.
xsputn is slightly faster than sputn, but is protected.