#include <tntdb/iface/iblob.h>
Inheritance diagram for IBlob:

Public Member Functions | |
| virtual | ~IBlob () |
| Destructor. | |
| virtual void | assign (const char *data, std::size_t len)=0 |
| Assign data of a given length. | |
| virtual char * | reserve (std::size_t len, bool shrink)=0 |
| Makes sure, the buffer has at least len bytes. | |
| virtual IBlob * | create () const=0 |
| Create a value implementation. | |
| virtual void | destroy ()=0 |
| Destroy a value implementation. | |
| std::size_t | size () const |
| Returns the size of the blob-data. | |
| const char * | data () const |
| Returns a pointer to the blob-data or 0 if the blob is empty. | |
| bool | operator== (const IBlob &other) const |
| Returns true if the two instances contain the same data. | |
Protected Attributes | |
| char * | _data |
| std::size_t | _size |
| virtual void assign | ( | const char * | data, | |
| std::size_t | len | |||
| ) | [pure virtual] |
The len bytes of the data pointed to by data are copied to this blob.
Implemented in BlobImpl.
| virtual IBlob* create | ( | ) | const [pure virtual] |
Returns a pointer to a implementation class derived from IBlob. IBlob::destroy must be implemented accordingly to destroy this instance.
Implemented in BlobImpl.
| virtual void destroy | ( | ) | [pure virtual] |
Destroys an instance previously created by the IBlob::create.
Implemented in BlobImpl.