libcaf
0.17.1
|
A streambuffer abstraction over a contiguous container. More...
#include <streambuf.hpp>
Public Types | |
using | base = std::basic_streambuf< typename Container::value_type, std::char_traits< typename Container::value_type > > |
using | char_type = typename base::char_type |
using | traits_type = typename base::traits_type |
using | int_type = typename base::int_type |
using | pos_type = typename base::pos_type |
using | off_type = typename base::off_type |
![]() | |
using | base = std::basic_streambuf< Container::value_type, std::char_traits< Container::value_type > > |
using | pos_type = typename base::pos_type |
using | off_type = typename base::off_type |
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) |
std::streamsize | sputn (const char_type *s, std::streamsize n) |
Protected Member Functions | |
base * | setbuf (char_type *s, std::streamsize n) override |
pos_type | seekpos (pos_type pos, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out) override |
pos_type | seekoff (off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which) override |
int | sync () override |
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) |
pos_type | default_seekoff (off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which) |
pos_type | default_seekpos (pos_type pos, std::ios_base::openmode which) |
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. |