Binary large objects.
More...
#include <blob.h>
|
| | 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) |
| | Make sure the buffer is big enough to hold at least len bytes.
|
|
bool | operator== (const Blob &b) const |
|
bool | operator!= (const Blob &b) const |
| const char * | data () const |
| | Get a pointer to the data or 0 if no data is set.
|
| std::size_t | size () const |
| | Get the size of the data.
|
◆ Blob() [1/2]
| tntdb::Blob::Blob |
( |
const char * | data, |
|
|
std::size_t | len ) |
|
inline |
Construct a Blob with data of a given length.
Constructs a Blob using a default implementation using new/delete to manage the blob-data and the shared data object. The first len bytes of the data pointed to by data are copied to this Blob.
◆ Blob() [2/2]
| tntdb::Blob::Blob |
( |
IBlob * | b | ) |
|
|
inlineexplicit |
Construct a Blob to use a customized implementation.
◆ assign()
| void tntdb::Blob::assign |
( |
const char * | data, |
|
|
std::size_t | len ) |
|
inline |
Assigns the data to this blob object.
◆ data()
| const char * tntdb::Blob::data |
( |
| ) |
const |
|
inline |
Get a pointer to the data or 0 if no data is set.
◆ reserve()
| char * tntdb::Blob::reserve |
( |
std::size_t | len, |
|
|
bool | shrink = false ) |
|
inline |
Make sure the buffer is big enough to hold at least len bytes.
If shrink is set, the buffer will be exactly len bytes. Data is not preserved when reallocated.
◆ size()
| std::size_t tntdb::Blob::size |
( |
| ) |
const |
|
inline |
Get the size of the data.
The documentation for this class was generated from the following file: