10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
BinaryData.h
1#ifndef TENDUKE_UTL_BINARYDATA_H
2#define TENDUKE_UTL_BINARYDATA_H
3
4#include "./MutableDataSpan.h"
5#include <cstddef>
6
7namespace tenduke { namespace utl {
8
9
14{
15public:
20 virtual unsigned char * getData() const = 0;
21
24 virtual std::size_t getLength() const = 0;
25
26 // ::tenduke::utl::MutableDataSpan implementation
27 // These have default implementations to keep backwards compatibility
28 unsigned char * data() override { return getData(); }
29 const unsigned char * data() const override { return getData(); }
30 std::size_t size_bytes() const override { return getLength(); }
31};
32
33}}
34
35#endif // TENDUKE_UTL_BINARYDATA_H
A holder of binary data.
Definition BinaryData.h:14
virtual unsigned char * getData() const =0
Returns the data.
unsigned char * data() override
Returns a mutable view of the underlying data.
Definition BinaryData.h:28
virtual std::size_t getLength() const =0
Returns the length of data in bytes.
std::size_t size_bytes() const override
Returns the size of the span in bytes.
Definition BinaryData.h:30
const unsigned char * data() const override
Returns a pointer to the beginning of the underlying sequence.
Definition BinaryData.h:29
Extends DataSpan with mutable access to the underlying data.
Definition MutableDataSpan.h:13
Utilities.
Definition Base64Decoder.h:10
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4