1#ifndef TENDUKE_UTL_FIXEDSIZEBINARYDATA_H
2#define TENDUKE_UTL_FIXEDSIZEBINARYDATA_H
4#include "./BinaryData.h"
59 static std::unique_ptr<unsigned char[]>
allocateData(
size_t length);
67 unsigned char *
getData()
const override;
76 const std::unique_ptr<unsigned char[]> data;
77 const std::size_t length;
FixedSizeBinaryData(std::size_t length)
Constructs new instance by allocating memory of length bytes.
A holder of binary data.
Definition BinaryData.h:13
FixedSizeBinaryData(std::unique_ptr< unsigned char[]> data, std::size_t length)
Constructs new instance by taking ownership of given data.
~FixedSizeBinaryData() override
Destructs the instance, frees contained data.
std::size_t getLength() const override
Returns length of the data.
Definition FixedSizeBinaryData.cpp:48
FixedSizeBinaryData(std::size_t length)
Constructs new instance by allocating memory of length bytes.
unsigned char * getData() const override
Returns pointer to the data.
Definition FixedSizeBinaryData.cpp:43
FixedSizeBinaryData(const unsigned char *data, std::size_t length)
Constructs new instance by copying the provided data.
static std::unique_ptr< unsigned char[]> allocateData(size_t length)
Allocates memory for length bytes.
Definition FixedSizeBinaryData.cpp:61
Utilities.
Definition Base64Decoder.h:10
Root for classes, functions and globals of 10Duke C++ Client.
Definition AbstractClientFactory.h:16