/* * buffer.cpp * * Created on: 7 сент. 2022 г. * Author: alexander */ #include #include #include namespace zh { Buffer::Buffer(const unsigned short int size) : _size(size) { _buffer = std::make_unique(_size); } const unsigned short int Buffer::getSize() const { return _size; } const std::string Buffer::getString() const { return reinterpret_cast(_buffer.get()); } void Buffer::clear() { bzero(_buffer.get(), _size); } Buffer::operator void*() { return _buffer.get(); } }