24 #include "ppl-config.h"
27 #include "assertions.hh"
43 const int_type eof = traits_type::eof();
62 const int_type eof = traits_type::eof();
63 const size_t sz_n =
static_cast<size_t>(n);
72 const size_t r =
cb_read(s + a, sz_n - a) + a;
79 return static_cast<std::streamsize
>(r);
84 const int_type eof = traits_type::eof();
93 const size_t r =
cb_write(s, static_cast<size_t>(n));
94 return static_cast<std::streamsize
>(r);
99 const int_type eof = traits_type::eof();
100 if (traits_type::eq_int_type(c, eof)) {
101 return (
sync() != 0) ? eof : traits_type::not_eof(c);
104 char buf =
static_cast<char>(
c);
virtual int_type uflow()
In case of underflow, gets a character and advances the next pointer.
int_type next_char_buf
Buffer for next character.
virtual int sync()
Synchronizes the stream buffer.
traits_type::int_type int_type
Integer type of the streambuf.
virtual size_t cb_read(char *, size_t)
virtual ~c_streambuf()
Destructor.
virtual int_type pbackfail(int_type c=traits_type::eof())
Puts character back in case of backup underflow.
int_type unget_char_buf
Buffer for the last character read.
char char_type
Character type of the streambuf.
virtual int_type overflow(int_type c)
Writes a character in case of overflow.
virtual int_type underflow()
Gets a character in case of underflow.
virtual std::streamsize xsputn(const char_type *s, std::streamsize n)
Writes a sequence of characters.
The entire library is confined to this namespace.
virtual size_t cb_write(const char *, size_t)
virtual std::streamsize xsgetn(char_type *s, std::streamsize n)
Gets a sequence of characters.