#include <buffer.hpp>
Public Types | |
| typedef std::pair < const_interval, const_interval > | interval_type |
Public Member Functions | |
| buffer (std::size_t n=0) | |
| ~buffer () | |
| interval | allocate (std::size_t n) |
| void | insert (char const *first, char const *last) |
| void | erase (std::size_t n) |
| std::size_t | size () const |
| std::size_t | capacity () const |
| void | reserve (std::size_t n) |
| interval_type | data () const |
| bool | empty () const |
| std::size_t | space_left () const |
| char const * | raw_data () const |
| void | check_invariant () const |
Private Attributes | |
| char * | m_first |
| char * | m_last |
| char * | m_write_cursor |
| char * | m_read_cursor |
| char * | m_read_end |
| bool | m_empty |
Classes | |
| struct | const_interval |
| struct | interval |
Definition at line 42 of file buffer.hpp.
| typedef std::pair<const_interval, const_interval> libtorrent::buffer::interval_type |
Definition at line 83 of file buffer.hpp.
| libtorrent::buffer::buffer | ( | std::size_t | n = 0 |
) | [inline] |
Definition at line 121 of file buffer.hpp.
| libtorrent::buffer::~buffer | ( | ) | [inline] |
| buffer::interval libtorrent::buffer::allocate | ( | std::size_t | n | ) | [inline] |
Definition at line 139 of file buffer.hpp.
References capacity(), INVARIANT_CHECK, m_empty, m_first, m_last, m_read_cursor, m_read_end, m_write_cursor, and reserve().
Referenced by test_main().
| void libtorrent::buffer::insert | ( | char const * | first, | |
| char const * | last | |||
| ) | [inline] |
Definition at line 204 of file buffer.hpp.
References capacity(), INVARIANT_CHECK, m_empty, m_first, m_last, m_read_end, m_write_cursor, n, reserve(), and space_left().
| void libtorrent::buffer::erase | ( | std::size_t | n | ) | [inline] |
Definition at line 247 of file buffer.hpp.
References INVARIANT_CHECK, m_empty, m_first, m_read_cursor, m_read_end, m_write_cursor, and size().
Referenced by test_main().
| std::size_t libtorrent::buffer::size | ( | ) | const [inline] |
Definition at line 274 of file buffer.hpp.
References m_empty, m_first, m_read_cursor, m_read_end, and m_write_cursor.
Referenced by check_invariant(), data(), erase(), and test_main().
| std::size_t libtorrent::buffer::capacity | ( | ) | const [inline] |
Definition at line 289 of file buffer.hpp.
References m_first, and m_last.
Referenced by allocate(), insert(), reserve(), and test_main().
| void libtorrent::buffer::reserve | ( | std::size_t | n | ) | [inline] |
Definition at line 294 of file buffer.hpp.
References capacity(), m_empty, m_first, m_last, m_read_cursor, m_read_end, m_write_cursor, n, and skip().
Referenced by allocate(), and insert().
| buffer::interval_type libtorrent::buffer::data | ( | ) | const [inline] |
Definition at line 368 of file buffer.hpp.
References INVARIANT_CHECK, m_empty, m_first, m_last, m_read_cursor, m_read_end, m_write_cursor, and size().
Referenced by test_main().
| bool libtorrent::buffer::empty | ( | ) | const [inline] |
| std::size_t libtorrent::buffer::space_left | ( | ) | const [inline] |
Definition at line 428 of file buffer.hpp.
References m_empty, m_first, m_last, m_read_cursor, and m_write_cursor.
Referenced by insert(), and test_main().
| char const* libtorrent::buffer::raw_data | ( | ) | const [inline] |
| void libtorrent::buffer::check_invariant | ( | ) | const [inline] |
Definition at line 350 of file buffer.hpp.
References a, b, m_first, m_last, m_read_cursor, m_read_end, m_write_cursor, and size().
char* libtorrent::buffer::m_first [private] |
Definition at line 109 of file buffer.hpp.
Referenced by allocate(), capacity(), check_invariant(), data(), erase(), insert(), raw_data(), reserve(), size(), space_left(), and ~buffer().
char* libtorrent::buffer::m_last [private] |
Definition at line 110 of file buffer.hpp.
Referenced by allocate(), capacity(), check_invariant(), data(), insert(), reserve(), and space_left().
char* libtorrent::buffer::m_write_cursor [private] |
Definition at line 111 of file buffer.hpp.
Referenced by allocate(), check_invariant(), data(), erase(), insert(), reserve(), size(), and space_left().
char* libtorrent::buffer::m_read_cursor [private] |
Definition at line 112 of file buffer.hpp.
Referenced by allocate(), check_invariant(), data(), erase(), reserve(), size(), and space_left().
char* libtorrent::buffer::m_read_end [private] |
Definition at line 113 of file buffer.hpp.
Referenced by allocate(), check_invariant(), data(), erase(), insert(), reserve(), and size().
bool libtorrent::buffer::m_empty [private] |
Definition at line 114 of file buffer.hpp.
Referenced by allocate(), data(), empty(), erase(), insert(), reserve(), size(), and space_left().
1.5.6