#include <data.hh>
Public Member Functions | |
template<class T> | |
Self & | operator= (const Data_< T > &other) |
Affectation. | |
Self & | operator= (const Data_< Self > &other) |
bool | empty () const |
::size_t | size () const |
Get the available size at raw(). | |
void | fit (unsigned len) |
Resize the buffer. | |
template<class T> | |
::size_t | operator- (const Data_< T > &rhs) const |
Return size() - rhs.size(). | |
const u_int8_t * | raw () const |
Access the raw data. | |
Data_ () | |
Data_ (const ::size_t size) | |
Data_ (const Data_ &other) | |
template<class T> | |
Data_ (const Data_< T > &other) | |
~Data_ () | |
Self | shrink_by (unsigned len) const |
Self | shrink_to (unsigned len) const |
Self | operator+ (unsigned offset) const |
Self & | operator+= (unsigned offset) |
void | dump (u_int8_t *p) const |
void | dump (Data_< Data > &d) const |
Self & | exact () |
const Self & | exact () const |
Protected Member Functions | |
void | use () |
Increment the buffer's usecount. | |
void | unuse () |
Decrement the buffer's usecount. | |
Protected Attributes | |
internal::shared_data * | data_ |
::size_t | instance_size_ |
unsigned | offset_ |
Friends | |
class | Data_<typename internal::other<Self>::return_type> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tell whether this object has an attached buffer or not.
|
|
|
|
|
|
Resize the buffer.
|
|
|
|
|
|
Return size() - rhs.size().
|
|
|
|
Affectation.
|
|
Access the raw data.
|
|
|
|
|
|
Get the available size at raw().
|
|
Decrement the buffer's usecount.
|
|
Increment the buffer's usecount.
|
|
|
|
|
|
|
|
|