29 lines
423 B
C++
29 lines
423 B
C++
/*
|
||
* buffer.hpp
|
||
*
|
||
* Created on: 7 сент. 2022 г.
|
||
* Author: alexander
|
||
*/
|
||
|
||
#pragma once
|
||
|
||
#include <memory>
|
||
|
||
namespace zh
|
||
{
|
||
|
||
class Buffer
|
||
{
|
||
private:
|
||
const unsigned short int _size;
|
||
std::unique_ptr<std::byte[]> _buffer;
|
||
public:
|
||
Buffer(const unsigned short int size);
|
||
const unsigned short int getSize() const;
|
||
const std::string getString() const;
|
||
void clear();
|
||
operator void*();
|
||
};
|
||
|
||
}
|