blob: bc7234a1e65e495a75f45250df7e1704329ffbd0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#pragma once
#include "std/cstdint.hpp"
namespace dp
{
class BufferBase
{
public:
BufferBase(uint8_t elementSize, uint16_t capacity);
uint16_t GetCapacity() const;
uint16_t GetCurrentSize() const;
uint16_t GetAvailableSize() const;
protected:
void Resize(uint16_t elementCount);
uint8_t GetElementSize() const;
void Seek(uint16_t elementNumber);
void UploadData(uint16_t elementCount);
private:
uint8_t m_elementSize;
uint16_t m_capacity;
uint16_t m_size;
};
} // namespace dp
|