Binary large objects. More...
#include <blob.h>
Classes | |
struct | Release |
Release policy for SmartPtr. More... | |
Public Member Functions | |
Blob (const char *data, std::size_t len) | |
Construct a Blob with data of a given length. | |
Blob (IBlob *b) | |
Construct a Blob to use a customized implementation. | |
void | assign (const char *data, std::size_t len) |
assigns the data to this blob object | |
char * | reserve (std::size_t len, bool shrink=false) |
makes sure, the buffer it at least len bytes. | |
bool | operator== (const Blob &b) const |
bool | operator!= (const Blob &b) const |
const char * | data () const |
Returns a pointer to the data or 0 if no data is set. | |
std::size_t | size () const |
Returns the size of the data. |
Binary large objects.
tntdb::Blob::Blob | ( | const char * | data, | |
std::size_t | len | |||
) | [inline] |
tntdb::Blob::Blob | ( | IBlob * | b | ) | [inline, explicit] |
Construct a Blob to use a customized implementation.
void tntdb::Blob::assign | ( | const char * | data, | |
std::size_t | len | |||
) | [inline] |
assigns the data to this blob object
const char* tntdb::Blob::data | ( | ) | const [inline] |
Returns a pointer to the data or 0 if no data is set.
char* tntdb::Blob::reserve | ( | std::size_t | len, | |
bool | shrink = false | |||
) | [inline] |
makes sure, the buffer it at least len bytes.
If shrink is set, the buffer will be exactly len bytes. Data is not preserved when reallocated.
std::size_t tntdb::Blob::size | ( | ) | const [inline] |
Returns the size of the data.