API Documentation
|
#include <MemoryManager.h>
Public Member Functions | |
constexpr | BufferAllocator () |
constexpr | BufferAllocator (BufferAllocator &&allocator) noexcept |
~BufferAllocator () | |
template<bool t_managed> | |
void | createSpace (t_index_type size) |
template<bool t_managed> | |
void | createSpace (t_index_type location, t_index_type size) |
void | addLast () |
void | removeLast () |
t_index_type | count (const t_type &value) const |
void | addIndex () |
void | addIndex (t_index_type location) |
void | removeIndex (t_index_type location) |
sint04 | compare (const BufferAllocator &allocator) const |
sint04 | compare (const BufferAllocator &allocator, t_index_type start, t_index_type end) const |
void | swap (t_index_type index_a, t_index_type index_b) |
void | clear () |
void | setSize (t_index_type size) |
t_type & | get (t_index_type index) |
const t_type & | get (t_index_type index) const |
t_type * | ptr () |
const t_type * | ptr () const |
t_index_type | memSize () const |
t_type * | begin () |
const t_type * | begin () const |
t_type * | begin (t_index_type index) const |
t_index_type | capacity () const |
t_type * | end () |
const t_type * | end () const |
t_type * | end (t_index_type index) |
void | resizeSpace (t_index_type new_size) |
void | setAll (const t_type &object, t_index_type offset, t_index_type size) |
template<bool is_primitive> | |
void | setAll (const t_type *src, t_index_type offset, t_index_type size) |
template<bool is_primitive, class t_other_index_type , bool t_other_null_term> | |
void | setAll (const BufferAllocator< t_type, t_other_index_type, t_other_null_term > &allocator, t_index_type offset, t_index_type other_offset, t_index_type size) |
template<class t_other_allocator > | |
void | setAllFromSource (const t_other_allocator &allocator, t_index_type offset, t_index_type other_offset, t_index_type size) |
template<bool t_managed> | |
void | allocationSizeCheck () |
void | removeAllIndex (t_index_type start, t_index_type end) |
template<class t_range_buffer > | |
void | removeAllIndices (const t_range_buffer &ranges) |
template<bool t_is_null> | |
void | nullTerminatorCheck () |
template<bool t_is_null> | |
t_type * | emptyPtr () const |
constexpr t_index_type | filledSize () const |
BufferAllocator & | operator= (BufferAllocator &&value) noexcept |
Static Public Member Functions | |
static constexpr bool | IsNullTerm () |
Public Attributes | |
t_type * | m_buffer |
t_index_type | m_filled_size |
t_index_type | m_allocated_size |
Class: BufferAllocator
A buffer allocator.
Author: Tyler Parke
|
inlineexplicitconstexpr |
|
inlineconstexprnoexcept |
|
inline |
|
inline |
|
inline |
Fn: void BufferAllocator::addIndex(t_index_type location)
Adds an index.
Author: Tyler Parke
Date: 2017-11-19
Parameters:
|
inline |
|
inline |
Fn: inline void BufferAllocator::allocationSizeCheck()
Allocation size check.
Author: Tyler Parke
|
inlinenodiscard |
Fn: t_type* BufferAllocator::begin()
Gets the begin.
Author: Tyler Parke
Date: 2017-11-19
|
inlinenodiscard |
Fn: const t_type* BufferAllocator::begin() const
Gets the begin.
Author: Tyler Parke
Date: 2017-11-19
|
inlinenodiscard |
Fn: t_type* BufferAllocator::begin(t_index_type index) const
Begins the given index.
Author: Tyler Parke
Date: 2017-11-19
Parameters: index - Zero-based index of the.
|
inlinenodiscard |
Fn: t_index_type BufferAllocator::capacity() const
Gets the capacity of the buffer or total space allocated to it.
Author: Tyler Parke
Date: 2017-04-15
|
inline |
Fn: void BufferAllocator::clear()
Clears this object to its blank/initial state.
Author: Tyler Parke
|
inlinenodiscard |
Fn: sint04 BufferAllocator::compare(const BufferAllocator& allocator) const
Compares this const BufferAllocator& object to another to determine their relative ordering.
Author: Tyler Parke
Date: 2017-11-19
Parameters: allocator - The constant buffer allocator& to compare to this object.
Returns: Negative if 'allocator' is less than '', 0 if they are equal, or positive if it is
|
inlinenodiscard |
Compares objects.
Author: Tyler Parke
Date: 2017-11-19
Parameters: allocator - Constant buffer allocator& to be compared. start - Uint 04 to be compared. end - Uint 04 to be compared.
Returns: Negative if 'allocator' is less than 'start', 0 if they are equal, or positive if it is
|
inlinenodiscard |
Fn: t_index_type BufferAllocator::count(const t_type& value) const
Counts the given value.
Author: Tyler Parke
Date: 2017-11-19
Parameters: value - The value.
|
inline |
Fn: void BufferAllocator::createSpace(t_index_type location, t_index_type size)
Creates a space.
Author: Tyler Parke
Date: 2017-11-19
Parameters: location - The location.
|
inline |
Fn: void BufferAllocator::createSpace(t_index_type size)
Creates a space.
Author: Tyler Parke
Date: 2017-11-19
Parameters:
|
inlinenodiscard |
Fn: template<bool t_is_null> inline void BufferAllocator::nullTerminatorCheck();
Null terminator check.
Author: Tyler Parke
Date: 2017-11-19
Typeparams:
|
inlinenodiscard |
Fn: t_type* BufferAllocator::end()
Gets the end.
Author: Tyler Parke
Date: 2017-11-19
|
inlinenodiscard |
Fn: const t_type* BufferAllocator::end() const
Gets the end.
Author: Tyler Parke
Date: 2017-11-19
|
inline |
Fn: t_type* BufferAllocator::end(t_index_type index)
Ends the given index.
Author: Tyler Parke
Date: 2017-11-19
Parameters: index - Zero-based index of the.
|
inlinenodiscardconstexpr |
Fn: t_index_type BufferAllocator::filledSize() const
Filled size.
Author: Tyler Parke
Date: 2017-11-19
|
inline |
Fn: t_type& BufferAllocator::get(t_index_type index)
Gets a t type& using the given index.
Author: Tyler Parke
Date: 2017-11-19
Parameters: index - The index to get.
|
inlinenodiscard |
Fn: const t_type& BufferAllocator::get(t_index_type index) const
Gets a constant type& using the given index.
Author: Tyler Parke
Date: 2017-11-19
Parameters: index - The index to get.
|
inlinestaticnodiscardconstexpr |
|
inlinenodiscard |
|
inline |
Fn: template<bool t_is_null> inline void BufferAllocator::nullTerminatorCheck();
Null terminator check.
Author: Tyler Parke
Date: 2017-11-19
Typeparams:
|
inlinenoexcept |
Fn: inline BufferAllocator& BufferAllocator::operator=(BufferAllocator&& value)
Move assignment operator.
Author: Tyler Parke
Date: 2017-11-19
Parameters: value - [in,out] The value.
|
inline |
|
inlinenodiscard |
|
inline |
Fn: void BufferAllocator::removeAllIndex(t_index_type start, t_index_type end)
Removes all index.
Author: Tyler Parke
Date: 2017-11-19
Parameters: start - The start.
|
inline |
|
inline |
Fn: void BufferAllocator::removeIndex(t_index_type location)
Removes the index described by location.
Author: Tyler Parke
Date: 2017-11-19
Parameters:
|
inline |
|
inline |
Fn: inline void BufferAllocator::resizeSpace(t_index_type new_size)
Resize space.
Author: Tyler Parke
Date: 2017-11-19
Parameters:
|
inline |
Fn: void BufferAllocator::setAll<true>(const t_type* src, t_index_type offset, t_index_type size)
Sets all.
Author: Tyler Parke
Date: 2017-11-19
Typeparams: true - Type of the true. Parameters: src - Source for the. offset - The offset.
Fn: void BufferAllocator::setAll<false>(const t_type* src, t_index_type offset, t_index_type size)
Sets all.
Author: Tyler Parke
Date: 2017-11-19
Typeparams: false - Type of the false. Parameters: src - Source for the. offset - The offset.
Fn: template<bool is_primitive> void BufferAllocator::setAll(const BufferAllocator& allocator, t_index_type offset, t_index_type other_offset, t_index_type size);
Sets all.
Author: Tyler Parke
Date: 2017-11-19
Typeparams: is_primitive - Type of the is primitive. Parameters: allocator - The allocator. offset - The offset. other_offset - The other offset.
|
inline |
Fn: void BufferAllocator::setAll(const t_type& object, t_index_type offset, t_index_type size)
Sets all.
Author: Tyler Parke
Date: 2017-11-19
Parameters: object - The object. offset - The offset.
|
inline |
Fn: template<bool is_primitive> void BufferAllocator::setAll(const t_type* src, t_index_type offset, t_index_type size);
Sets all.
Author: Tyler Parke
Date: 2017-11-19
Typeparams: is_primitive - Type of the is primitive. Parameters: src - Source for the. offset - The offset.
|
inline |
|
inline |
Fn: void BufferAllocator::setSize(t_index_type size)
Sets a size.
Author: Tyler Parke
Date: 2017-11-19
Parameters:
|
inline |
Fn: void BufferAllocator::swap(t_index_type index_a, t_index_type index_b)
Swaps.
Author: Tyler Parke
Date: 2017-11-19
Parameters: index_a - The index a.
t_index_type m_allocated_size |
t_type* m_buffer |
The buffer that stores the actual data.
t_index_type m_filled_size |