#include <basic_streambuf.hpp>
Inherits asio::detail::noncopyable.
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. | |
| std::size_t | size () const |
| Return the size of the get area in characters. | |
| std::size_t | max_size () const |
| Return the maximum size of the buffer. | |
| const_buffers_type | data () const |
| Get a list of buffers that represents the get area. | |
| mutable_buffers_type | prepare (std::size_t size) |
| Get a list of buffers that represents the put area, with the given 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. | |
Protected Types | |
| enum | { buffer_delta = 128 } |
Protected Member Functions | |
| int_type | underflow () |
| int_type | overflow (int_type c) |
| void | reserve (std::size_t n) |
Private Attributes | |
| std::size_t | max_size_ |
| std::vector< char_type, Allocator > | buffer_ |
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] |
| 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.
References asio::basic_streambuf< Allocator >::buffer_, asio::basic_streambuf< Allocator >::buffer_delta, and asio::basic_streambuf< Allocator >::max_size_.
| 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.
Referenced by asio::async_read(), asio::async_read_until(), asio::read(), and asio::read_until().
| 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.
References asio::basic_streambuf< Allocator >::max_size_.
Referenced by asio::async_read(), asio::async_read_until(), asio::read(), and asio::read_until().
| 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.
References asio::buffer().
Referenced by asio::async_read_until(), asio::async_write(), asio::read_until(), and asio::write().
| 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.
References asio::buffer(), and asio::basic_streambuf< Allocator >::reserve().
Referenced by asio::async_read(), asio::async_read_until(), asio::read(), and asio::read_until().
| 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.
Referenced by asio::read(), and asio::read_until().
| 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.
Referenced by asio::write().
| int_type asio::basic_streambuf< Allocator >::underflow | ( | ) | [inline, protected] |
Definition at line 113 of file basic_streambuf.hpp.
References asio::basic_streambuf< Allocator >::buffer_.
| int_type asio::basic_streambuf< Allocator >::overflow | ( | int_type | c | ) | [inline, protected] |
Definition at line 126 of file basic_streambuf.hpp.
References asio::basic_streambuf< Allocator >::buffer_delta, asio::basic_streambuf< Allocator >::max_size_, and asio::basic_streambuf< Allocator >::reserve().
| void asio::basic_streambuf< Allocator >::reserve | ( | std::size_t | n | ) | [inline, protected] |
Definition at line 151 of file basic_streambuf.hpp.
References asio::basic_streambuf< Allocator >::buffer_, and asio::basic_streambuf< Allocator >::max_size_.
Referenced by asio::basic_streambuf< Allocator >::overflow(), and asio::basic_streambuf< Allocator >::prepare().
std::size_t asio::basic_streambuf< Allocator >::max_size_ [private] |
Definition at line 192 of file basic_streambuf.hpp.
Referenced by asio::basic_streambuf< Allocator >::basic_streambuf(), asio::basic_streambuf< Allocator >::max_size(), asio::basic_streambuf< Allocator >::overflow(), and asio::basic_streambuf< Allocator >::reserve().
std::vector<char_type, Allocator> asio::basic_streambuf< Allocator >::buffer_ [private] |
Definition at line 193 of file basic_streambuf.hpp.
Referenced by asio::basic_streambuf< Allocator >::basic_streambuf(), asio::basic_streambuf< Allocator >::reserve(), and asio::basic_streambuf< Allocator >::underflow().
1.5.6