DynExp
Highly flexible laboratory automation for dynamically changing experiments.
|
Data type which manages a binary large object. The reserved memory is freed upon destruction. More...
Public Types | |
using | DataType = unsigned char[] |
Type of the buffer's data. More... | |
Public Member Functions | |
BlobDataType ()=default | |
Constructs an empty object. More... | |
BlobDataType (const BlobDataType &Other) | |
Constructs an object copying data from Other . More... | |
BlobDataType (BlobDataType &&Other) noexcept | |
Constructs an object moving from Other . Other is empty afterwards. More... | |
BlobDataType & | operator= (const BlobDataType &Other) |
Copy-assigns data from Other . More... | |
BlobDataType & | operator= (BlobDataType &&Other) noexcept |
Move-assigns data from Other . Other is empty afterwards. More... | |
void | Reserve (size_t Size) |
Reserves Size bytes of memory freeing any previously reserved memory. More... | |
void | Assign (size_t Size, const DataType Data) |
Copies Size bytes from Data to the buffer freeing any previously reserved memory. More... | |
void | Reset () |
Frees any reserved memory. More... | |
DataPtrType::element_type * | Release () noexcept |
Releases ownership of the stored buffer returning a pointer to it and leaving this instance empty. More... | |
auto | GetPtr () noexcept |
Returns a pointer to the stored buffer. More... | |
auto | Size () const noexcept |
Returns the size of the stored data in bytes. More... | |
Private Types | |
using | DataPtrType = std::unique_ptr< DataType > |
Type of the underlying smart pointer managing the buffer. More... | |
Private Attributes | |
DataPtrType | DataPtr |
Pointer to the buffer. More... | |
size_t | DataSize = 0 |
Size of the stored data in bytes. More... | |
Data type which manages a binary large object. The reserved memory is freed upon destruction.
|
private |
using Util::BlobDataType::DataType = unsigned char[] |
|
default |
Constructs an empty object.
Util::BlobDataType::BlobDataType | ( | const BlobDataType & | Other | ) |
|
noexcept |
void Util::BlobDataType::Assign | ( | size_t | Size, |
const DataType | Data | ||
) |
|
inlinenoexcept |
|
noexcept |
BlobDataType & Util::BlobDataType::operator= | ( | const BlobDataType & | Other | ) |
|
noexcept |
void Util::BlobDataType::Reserve | ( | size_t | Size | ) |
void Util::BlobDataType::Reset | ( | ) |
|
inlinenoexcept |
|
private |
|
private |