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
13
class
SimpleBuffer :
public
BinaryData
,
public
virtual
DataSink
14
{
15
public
:
16
SimpleBuffer();
17
~SimpleBuffer()
override
;
18
24
void
append
(
const
std::uint8_t *newData,
size_t
newDataLength)
override
;
25
30
void
append
(const ::tenduke::utl::DataSpan &
data
)
override
;
31
32
void
append
(std::uint8_t
byte
)
override
;
33
34
// tenduke::utl::BinaryData interface
35
unsigned
char
*
getData
()
const override
{
return
data_;}
36
std::size_t
getLength
()
const override
{
return
length_;}
37
38
private
:
39
unsigned
char
* data_;
40
std::size_t length_;
41
};
42
43
44
}}
45
46
#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:35
tenduke::utl::SimpleBuffer::getLength
std::size_t getLength() const override
Returns the length of data in bytes.
Definition
SimpleBuffer.h:36
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