A streambuffer abstraction over a fixed array of bytes.
More...
#include <streambuf.hpp>
Inherits basic_streambuf< CharT, Traits >.
|
|
using | base = std::basic_streambuf< CharT, Traits > |
| |
|
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 |
| |
|
| template<class Container , class = typename std::enable_if< detail::has_data_member<Container>::value && detail::has_size_member<Container>::value >::type> |
| | arraybuf (Container &c) |
| | Constructs an array streambuffer from a container. More...
|
| |
| | arraybuf (CharT *data, size_t size) |
| | Constructs an array streambuffer from a raw character sequence. More...
|
| |
|
| arraybuf (arraybuf &&other) |
| |
|
arraybuf & | operator= (arraybuf &&other) |
| |
| std::basic_streambuf< CharT, Traits > * | setbuf (CharT *s, std::streamsize n) override |
| | Replaces the internal character sequence with a new one. More...
|
| |
|
|
std::streamsize | xsputn (const char_type *s, std::streamsize n) override |
| |
|
std::streamsize | xsgetn (char_type *s, std::streamsize n) override |
| |
template<class CharT = char, class Traits = std::char_traits<CharT>>
class caf::arraybuf< CharT, Traits >
A streambuffer abstraction over a fixed array of bytes.
This streambuffer cannot overflow/underflow. Once it has reached its end, attempts to read characters will return trait_type::eof.
template<class CharT = char, class Traits = std::char_traits<CharT>>
template<class Container , class = typename std::enable_if< detail::has_data_member<Container>::value && detail::has_size_member<Container>::value >::type>
Constructs an array streambuffer from a container.
- Parameters
-
- Precondition
c.data() must point to a contiguous sequence of characters having length c.size().
template<class CharT = char, class Traits = std::char_traits<CharT>>
Constructs an array streambuffer from a raw character sequence.
- Parameters
-
| data | A pointer to the first character. |
| size | The length of the character sequence. |
template<class CharT = char, class Traits = std::char_traits<CharT>>
| std::basic_streambuf<CharT, Traits>* caf::arraybuf< CharT, Traits >::setbuf |
( |
CharT * |
s, |
|
|
std::streamsize |
n |
|
) |
| |
|
override |
Replaces the internal character sequence with a new one.
- Parameters
-
| s | A pointer to the first character. |
| n | The length of the character sequence. |
The documentation for this class was generated from the following file:
- libcaf_core/caf/streambuf.hpp