STXXL
1.4-dev
|
binary_buffer_ref represents a memory area as pointer and valid length.
It is not deallocated or otherwise managed. This class can be used to pass around references to binary_buffer objects.
Definition at line 424 of file binary_buffer.h.
Public Member Functions | |
binary_buffer_ref (const binary_buffer &bb) | |
Constructor, assign memory area from binary_buffer. More... | |
binary_buffer_ref (const void *data, size_t n) | |
Constructor, assign memory area from pointer and length. More... | |
binary_buffer_ref (const std::string &str) | |
Constructor, assign memory area from string, does NOT copy. More... | |
const void * | data () const |
Return a pointer to the currently kept memory area. More... | |
bool | operator!= (const binary_buffer_ref &br) const |
Compare contents of two binary_buffer_refs. More... | |
bool | operator== (const binary_buffer_ref &br) const |
Compare contents of two binary_buffer_refs. More... | |
size_t | size () const |
Return the currently valid length in bytes. More... | |
std::string | str () const |
Explicit conversion to std::string (copies memory of course). More... | |
Protected Attributes | |
const char * | m_data |
Allocated buffer pointer. More... | |
size_t | m_size |
Size of valid data. More... | |
|
inline |
Constructor, assign memory area from binary_buffer.
Definition at line 435 of file binary_buffer.h.
|
inline |
Constructor, assign memory area from pointer and length.
Definition at line 440 of file binary_buffer.h.
|
inline |
Constructor, assign memory area from string, does NOT copy.
Definition at line 445 of file binary_buffer.h.
|
inline |
Return a pointer to the currently kept memory area.
Definition at line 450 of file binary_buffer.h.
|
inline |
Compare contents of two binary_buffer_refs.
Definition at line 469 of file binary_buffer.h.
|
inline |
Compare contents of two binary_buffer_refs.
Definition at line 462 of file binary_buffer.h.
|
inline |
Return the currently valid length in bytes.
Definition at line 454 of file binary_buffer.h.
|
inline |
Explicit conversion to std::string (copies memory of course).
Definition at line 458 of file binary_buffer.h.
|
protected |
Allocated buffer pointer.
Definition at line 428 of file binary_buffer.h.
Referenced by operator!=(), and operator==().
|
protected |
Size of valid data.
Definition at line 431 of file binary_buffer.h.
Referenced by operator!=(), and operator==().