libtorrent::buffer Class Reference

#include <buffer.hpp>

List of all members.

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


Detailed Description

Definition at line 42 of file buffer.hpp.


Member Typedef Documentation

Definition at line 83 of file buffer.hpp.


Constructor & Destructor Documentation

libtorrent::buffer::buffer ( std::size_t  n = 0  )  [inline]

Definition at line 121 of file buffer.hpp.

libtorrent::buffer::~buffer (  )  [inline]

Definition at line 134 of file buffer.hpp.

References m_first.


Member Function Documentation

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]

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]

Definition at line 423 of file buffer.hpp.

References m_empty.

Referenced by test_main().

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]

Definition at line 99 of file buffer.hpp.

References m_first.

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().


Member Data Documentation

char* libtorrent::buffer::m_first [private]

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().

Definition at line 111 of file buffer.hpp.

Referenced by allocate(), check_invariant(), data(), erase(), insert(), reserve(), size(), and space_left().

Definition at line 112 of file buffer.hpp.

Referenced by allocate(), check_invariant(), data(), erase(), reserve(), size(), and space_left().

Definition at line 113 of file buffer.hpp.

Referenced by allocate(), check_invariant(), data(), erase(), insert(), reserve(), and size().

Definition at line 114 of file buffer.hpp.

Referenced by allocate(), data(), empty(), erase(), insert(), reserve(), size(), and space_left().


The documentation for this class was generated from the following file:

Generated on Sun May 25 00:21:41 2008 by  doxygen 1.5.6