$search
Automatically resizable buffer class based on std::streambuf. More...
#include <basic_streambuf.hpp>

Public Types | |
| typedef asio::const_buffers_1 | const_buffers_type |
| typedef asio::mutable_buffers_1 | mutable_buffers_type |
Public Member Functions | |
| basic_streambuf (std::size_t max_size=(std::numeric_limits< std::size_t >::max)(), const Allocator &allocator=Allocator()) | |
| Construct a buffer with a specified maximum size. | |
| void | commit (std::size_t n) |
| Move the start of the put area by the specified number of characters. | |
| void | consume (std::size_t n) |
| Move the start of the get area by the specified number of characters. | |
| const_buffers_type | data () const |
| Get a list of buffers that represents the get area. | |
| std::size_t | max_size () const |
| Return the maximum size of the buffer. | |
| mutable_buffers_type | prepare (std::size_t size) |
| Get a list of buffers that represents the put area, with the given size. | |
| std::size_t | size () const |
| Return the size of the get area in characters. | |
Protected Types | |
| enum | { buffer_delta = 128 } |
Protected Member Functions | |
| int_type | overflow (int_type c) |
| void | reserve (std::size_t n) |
| int_type | underflow () |
Private Attributes | |
| std::vector< char_type, Allocator > | buffer_ |
| std::size_t | max_size_ |
Automatically resizable buffer class based on std::streambuf.
Definition at line 36 of file basic_streambuf.hpp.
| typedef asio::const_buffers_1 asio::basic_streambuf< Allocator >::const_buffers_type |
Definition at line 48 of file basic_streambuf.hpp.
| typedef asio::mutable_buffers_1 asio::basic_streambuf< Allocator >::mutable_buffers_type |
Definition at line 49 of file basic_streambuf.hpp.
anonymous enum [protected] |
Definition at line 109 of file basic_streambuf.hpp.
| asio::basic_streambuf< Allocator >::basic_streambuf | ( | std::size_t | max_size = (std::numeric_limits<std::size_t>::max)(), |
|
| const Allocator & | allocator = Allocator() | |||
| ) | [inline, explicit] |
Construct a buffer with a specified maximum size.
Definition at line 53 of file basic_streambuf.hpp.
| void asio::basic_streambuf< Allocator >::commit | ( | std::size_t | n | ) | [inline] |
Move the start of the put area by the specified number of characters.
Definition at line 93 of file basic_streambuf.hpp.
| void asio::basic_streambuf< Allocator >::consume | ( | std::size_t | n | ) | [inline] |
Move the start of the get area by the specified number of characters.
Definition at line 101 of file basic_streambuf.hpp.
| const_buffers_type asio::basic_streambuf< Allocator >::data | ( | ) | const [inline] |
Get a list of buffers that represents the get area.
Definition at line 78 of file basic_streambuf.hpp.
| std::size_t asio::basic_streambuf< Allocator >::max_size | ( | ) | const [inline] |
Return the maximum size of the buffer.
Definition at line 72 of file basic_streambuf.hpp.
| int_type asio::basic_streambuf< Allocator >::overflow | ( | int_type | c | ) | [inline, protected] |
Definition at line 124 of file basic_streambuf.hpp.
| mutable_buffers_type asio::basic_streambuf< Allocator >::prepare | ( | std::size_t | size | ) | [inline] |
Get a list of buffers that represents the put area, with the given size.
Definition at line 85 of file basic_streambuf.hpp.
| void asio::basic_streambuf< Allocator >::reserve | ( | std::size_t | n | ) | [inline, protected] |
Definition at line 149 of file basic_streambuf.hpp.
| std::size_t asio::basic_streambuf< Allocator >::size | ( | ) | const [inline] |
Return the size of the get area in characters.
Definition at line 66 of file basic_streambuf.hpp.
| int_type asio::basic_streambuf< Allocator >::underflow | ( | ) | [inline, protected] |
Definition at line 111 of file basic_streambuf.hpp.
std::vector<char_type, Allocator> asio::basic_streambuf< Allocator >::buffer_ [private] |
Definition at line 191 of file basic_streambuf.hpp.
std::size_t asio::basic_streambuf< Allocator >::max_size_ [private] |
Definition at line 190 of file basic_streambuf.hpp.