blob: 2be7849249cfc955b5c6dfe5fba7bb3f230ab5a7 (
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/stdint.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
|