Bytes, which must be resolved "lazily" via get() and released via this object (destructor). Unlike void* style bytes, this may represent allocated resources and/or bytes that are only produced on demand.
More...
#include <objectbox.hpp>
Bytes, which must be resolved "lazily" via get() and released via this object (destructor). Unlike void* style bytes, this may represent allocated resources and/or bytes that are only produced on demand.
◆ BytesLazy() [1/4]
obx::BytesLazy::BytesLazy |
( |
| ) |
|
|
inline |
◆ BytesLazy() [2/4]
◆ BytesLazy() [3/4]
obx::BytesLazy::BytesLazy |
( |
BytesLazy && |
src | ) |
|
|
inlinenoexcept |
◆ BytesLazy() [4/4]
obx::BytesLazy::BytesLazy |
( |
const BytesLazy & |
src | ) |
|
|
delete |
No copying allowed: OBX_bytes_lazy needs a single owner (no method to "clone" it).
◆ ~BytesLazy()
obx::BytesLazy::~BytesLazy |
( |
| ) |
|
|
inline |
◆ clear()
void obx::BytesLazy::clear |
( |
| ) |
|
|
inline |
Clears any bytes resources.
◆ get()
void obx::BytesLazy::get |
( |
const void *& |
outBytes, |
|
|
size_t & |
outSize |
|
) |
| const |
|
inline |
Gets the bytes and its size using the given "out" references.
◆ hasBytes()
bool obx::BytesLazy::hasBytes |
( |
| ) |
|
|
inline |
- Returns
- true if it holds actual bytes resources (e.g. not default-constructed and not clear()ed yet).
◆ isNull()
bool obx::BytesLazy::isNull |
( |
| ) |
|
|
inline |
- Returns
- true if it does not hold any bytes resources (e.g. default-constructed or already clear()ed).
◆ size()
size_t obx::BytesLazy::size |
( |
| ) |
|
|
inline |
Note that this will potentially resolve actual bytes just like get(). Also, it would be more efficient to only call get() to get everything in a single call.
◆ swap()
void obx::BytesLazy::swap |
( |
BytesLazy & |
other | ) |
|
|
inline |