geekbrains_network_programming/lesson_03/header/buffer.hpp

29 lines
423 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 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*();
};
}