mn_buffer.hpp
Go to the documentation of this file.
89 : m_sSize(other.m_sSize), m_sUsed(other.m_sUsed), m_pRawBuffer(0), m_bOwnMem(true), m_allocator() {
A buffer class that allocates a buffer of a given type and size.
Definition: mn_buffer.hpp:37
constexpr bool is_full() const noexcept
is the buffer full?
Definition: mn_buffer.hpp:242
bool is_equel(const buffer &other) const
Is the given buffer equel with this?
Definition: mn_buffer.hpp:225
buffer(const size_type &size)
Consructs and allocates the Buffer.
Definition: mn_buffer.hpp:58
bool operator!=(const buffer &other) const
Not compare operator.
Definition: mn_buffer.hpp:276
iterator begin()
Get the iterator to the beginning of the buffer.
Definition: mn_buffer.hpp:104
const_iterator end() const
Get the iterator to end of the buffer.
Definition: mn_buffer.hpp:122
constexpr bool is_empty() const noexcept
is the buffer empty?
Definition: mn_buffer.hpp:236
void append(const_pointer pBuffer, std::size_t sBufferSize)
Resizes this buffer and appends the given data.
Definition: mn_buffer.hpp:129
bool resize(size_type newSize, bool bReserve=true)
Resizes the buffer capacity and size.
Definition: mn_buffer.hpp:159
~buffer()
Deconstrut the buffer. Is allocated the memory by buffer, then deallocated it.
Definition: mn_buffer.hpp:96
bool operator==(const buffer &other) const
Compare operator.
Definition: mn_buffer.hpp:270
void assign(const_pointer pBuffer, size_type size)
Assigns the argument buffer to this buffer.
Definition: mn_buffer.hpp:206
void init_internal_buffer(const pointer buffer)
Definition: mn_buffer.hpp:304
constexpr size_type get_used() const noexcept
Get the used size of the buffer in elements.
Definition: mn_buffer.hpp:259
bool change_size(size_type newSize, bool bReserve=true)
Change the buffer size.
Definition: mn_buffer.hpp:183
constexpr size_type get_size_bytes() const noexcept
Get the allocated memory size in bytes.
Definition: mn_buffer.hpp:253
buffer(pointer buffer, size_type size)
Consructs the buffer from a given memory pointer.
Definition: mn_buffer.hpp:69
constexpr size_type get_size() const noexcept
Get the allocated memory size in elements.
Definition: mn_buffer.hpp:247
buffer(const_pointer buffer, size_type size)
Consructs and allocates the Buffer. copies the contents of the supplied memory into the buffer.
Definition: mn_buffer.hpp:79
const_iterator begin() const
Get the iterator to the beginning of the buffer.
Definition: mn_buffer.hpp:110
void append(value_type value)
Resizes this buffer and appends the given data.
Definition: mn_buffer.hpp:139
constexpr size_type get_used_bytes() const noexcept
Get the used size of the buffer in bytes.
Definition: mn_buffer.hpp:265
void append(const self_type &refBuffer)
Resizes this buffer and appends the given data.
Definition: mn_buffer.hpp:148
Basic algorithmens This file is part of the Mini Thread Library (https://github.com/RoseLeBlood/MiniT...
This file is part of the Mini Thread Library (https://github.com/RoseLeBlood/MiniThread ).
Definition: mn_allocator_typetraits.hpp:25
typename internal::type_with_alignment< alignment_of< T >::res > res
Definition: mn_alignment.hpp:133
Definition: mn_iterator.hpp:36