libcaf
0.15.5
|
A streambuffer abstraction over a contiguous container. More...
#include <streambuf.hpp>
Public Member Functions | |
template<class C = Container, class = typename std::enable_if< detail::has_data_member<C>::value && detail::has_size_member<C>::value >::type> | |
containerbuf (Container &c) | |
Constructs a container streambuf. More... | |
containerbuf (containerbuf &&other) | |
containerbuf & | operator= (containerbuf &&other) |
int_type | sgetc () |
int_type | sputc (char_type c) |
Protected Member Functions | |
std::streamsize | xsgetn (char_type *s, std::streamsize n) override |
int_type | overflow (int_type c=traits_type::eof()) final |
std::streamsize | xsputn (const char_type *s, std::streamsize n) override |
![]() | |
std::enable_if< sizeof(T)==4 >::type | safe_pbump (std::streamsize n) |
The standard only defines pbump(int), which can overflow on 64-bit architectures. More... | |
std::enable_if< sizeof(T)==8 >::type | safe_pbump (std::streamsize n) |
std::enable_if< sizeof(T)==4 >::type | safe_gbump (std::streamsize n) |
std::enable_if< sizeof(T)==8 >::type | safe_gbump (std::streamsize n) |
A streambuffer abstraction over a contiguous container.
It supports reading in the same style as arraybuf
, but is unbounded for output.
caf::containerbuf< Container >::containerbuf | ( | Container & | c | ) |
Constructs a container streambuf.
c | A contiguous container. |