10Duke Enterprise C++ SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
SimpleBuffer.h
1
#ifndef TENDUKE_UTL_SIMPLEBUFFER_H
2
#define TENDUKE_UTL_SIMPLEBUFFER_H
3
4
#include "./BinaryData.h"
5
#include "./DataSink.h"
6
7
namespace
tenduke
{
namespace
utl
{
8
9
16
class
SimpleBuffer :
public
BinaryData
,
public
virtual
DataSink
17
{
18
public
:
19
SimpleBuffer();
20
~SimpleBuffer()
override
;
21
22
SimpleBuffer(
const
SimpleBuffer &) =
delete
;
23
SimpleBuffer &operator=(
const
SimpleBuffer &) =
delete
;
24
32
void
append
(
const
std::uint8_t *newData,
size_t
newDataLength)
override
;
33
38
void
append
(const ::tenduke::utl::DataSpan &
data
)
override
;
39
40
void
append
(std::uint8_t
byte
)
override
;
41
42
// tenduke::utl::BinaryData interface
43
unsigned
char
*
getData
()
const override
{
return
data_;}
44
std::size_t
getLength
()
const override
{
return
length_;}
45
46
private
:
47
unsigned
char
* data_;
48
std::size_t length_;
49
std::size_t capacity_;
50
};
51
52
53
}}
54
55
#endif
// TENDUKE_UTL_SIMPLEBUFFER_H
DataSink
A sink to which binary data can be appended.
Definition
DataSink.h:14
tenduke::utl::BinaryData
A holder of binary data.
Definition
BinaryData.h:14
tenduke::utl::BinaryData::data
unsigned char * data() override
Returns a mutable view of the underlying data.
Definition
BinaryData.h:28
tenduke::utl::SimpleBuffer::getData
unsigned char * getData() const override
Returns the data.
Definition
SimpleBuffer.h:43
tenduke::utl::SimpleBuffer::getLength
std::size_t getLength() const override
Returns the length of data in bytes.
Definition
SimpleBuffer.h:44
tenduke::utl::SimpleBuffer::append
void append(const std::uint8_t *newData, size_t newDataLength) override
Appends data to the buffer.
tenduke::utl
Utilities.
Definition
Base64Decoder.h:10
tenduke
Root for classes, functions and globals of 10Duke C++ Client.
Definition
APIRequest.h:4
core
core
src
utl
SimpleBuffer.h
Generated by
1.17.0