API Documentation
Loading...
Searching...
No Matches
Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > Class Template Reference

The equivelent of std::vector but with a bit more control. The basic array unit of the library. More...

#include <Buffer.hpp>

Inheritance diagram for Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager >:
[legend]
Collaboration diagram for Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager >:
[legend]

Public Member Functions

void add (const t_type &object)
 Adds object to the end of the buffer.
 
void add (t_index_type location, const t_type &object)
 Adds and object to a specific location. Equivelent to insert.
 
void add (t_index_type location, t_type &&object)
 Adds an object to a specific location. Equivelent to insert.
 
void add (t_type &&object)
 Adds object to the end of the buffer.
 
template<class t_other_memory_allocator , class t_other_index_type , class t_other_memory_manager >
void addAll (const Buffer< t_type, t_other_index_type, t_other_memory_allocator, t_other_memory_manager > &buffer)
 
void addAll (const t_type *buffer)
 
void addAll (const t_type *buffer, t_index_type buffer_size)
 
template<bool t_managed = false>
void addAndFillSpace (t_index_type space_to_add, const t_type &fill_object)
 
template<bool t_managed>
void addSpace (t_index_type location, t_index_type size)
 
template<bool t_managed>
void addSpace (t_index_type space_to_add)
 Adds a space to the end of the buffer.
 
decltype(auto) begin ()
 
decltype(auto) begin () const
 
decltype(auto) begin (t_index_type index) const
 
constexpr Buffer ()
 
constexpr Buffer (Buffer &&buffer) noexcept
 
constexpr Buffer (const Buffer &buffer)
 
template<class t_iterator >
 Buffer (const t_iterator &begin, const t_iterator &end)
 
 Buffer (const t_type *buffer, t_index_type size)
 
 Buffer (std::initializer_list< t_type > l)
 
 Buffer (t_index_type size)
 
 Buffer (t_index_type size, const t_type &fill_object)
 
t_index_type capacity () const
 
void clear ()
 
void clear (t_index_type new_capacity)
 
sint04 compare (const Buffer &value) const
 Compares this Buffer to another to determine their relative ordering.
 
sint04 compare (const Buffer &value, t_index_type start, t_index_type end) const
 
bool contains (const t_type &element) const
 
bool contains (const t_type &element, const std::function< bool(const t_type &, const t_type &)> &equal_function) const
 
bool contains (const t_type &element, t_index_type start) const
 
bool contains (const t_type &element, t_index_type start, t_index_type search_size) const
 
t_index_type count (const t_type &element) const
 
decltype(auto) end ()
 
decltype(auto) end () const
 
decltype(auto) end (t_index_type index)
 
void ensureCapacity (t_index_type new_capacity, bool ensure_not_greater=false, bool ensure_not_less=true)
 
bool equals (const Buffer &buffer) const
 
decltype(auto) get (t_index_type index)
 
decltype(auto) get (t_index_type index) const
 
Buffer getAll (t_index_type start, t_index_type size)
 
template<class t_other_type , class t_other_index_type = uint04, class t_other_memory_allocator = ObjectAllocator<ObjectInfo<t_other_type>::Primitive>, class t_other_memory_manager = BufferAllocator<t_other_type, t_index_type, false>>
Buffer< t_other_type, t_other_index_type, t_other_memory_allocator, t_other_memory_manager > getAs () const
 Gets a copy of this buffer, with filled objects t_other_type, where all objects are created using the contents of this buffer.
 
t_index_type indexOf (const t_type &element) const
 
t_index_type indexOf (const t_type &element, t_index_type start_pos) const
 
t_index_type indexOf (const t_type &element, t_index_type start_pos, t_index_type search_size) const
 
void insert (const t_index_type location, const t_type *buffer)
 Inserts data into the buffer, assumed to be null terminated.
 
void insert (t_index_type location, const t_type &object)
 Adds an object to a specific location.
 
void insert (t_index_type location, t_type &&object)
 Adds an object to a specific location.
 
void insert (t_index_type offset, const Buffer &buffer)
 
void insert (t_index_type offset, const t_type *const buffer, t_index_type buffer_size)
 Inserts data into the buffer.
 
bool isEmpty () const
 
bool isSorted () const
 
bool isSortedSet () const
 
decltype(auto) last ()
 
decltype(auto) last () const
 
t_index_type lastIndexOf (const t_type &element) const
 
constexpr t_memory_manager & memoryInterface ()
 
constexpr const t_memory_manager & memoryInterface () const
 
t_index_type memSize () const
 
void move (t_index_type from, t_index_type to)
 
 operator const t_type * () const
 Gets the first location of type* in the array.
 
 operator t_type * ()
 Gets the first location of type* in the array.
 
bool operator!= (const Buffer &buffer) const
 
Buffer operator+ (const Buffer &value) const
 
Buffer operator+ (const t_type &element) const
 
Bufferoperator+= (const Buffer &value)
 
const Bufferoperator+= (const t_type &element)
 
bool operator< (const Buffer &buffer) const
 
bool operator<= (const Buffer &buffer) const
 
Bufferoperator= (Buffer &&buffer) noexcept
 
Bufferoperator= (const Buffer &buffer)
 
bool operator== (const Buffer &buffer) const
 
bool operator> (const Buffer &buffer) const
 
bool operator>= (const Buffer &buffer) const
 
decltype(auto) operator[] (const int index)
 
decltype(auto) operator[] (const int index) const
 
decltype(auto) operator[] (const t_index_type index)
 
decltype(auto) operator[] (const t_index_type value) const
 
void primitiveSort ()
 
decltype(auto) ptr ()
 
decltype(auto) ptr () const
 
void removeAllIndex (t_index_type start, t_index_type end)
 
template<class t_range_buffer >
void removeAllIndices (const t_range_buffer &ranges)
 
void removeAllOrdered (const t_type &object)
 Removes all instances of the object. Function is slower than removeAllUnordered but order is preserved.
 
template<class t_functor >
void removeAllOrderedFn (const t_functor &functor)
 Removes all items based on the functor. The functor should return true if the item is deleted or false if the item should stay in the array. Function is slower than removeAllUnordered but order is preserved.
 
template<class t_functor >
void removeAllUnordered (const t_functor &functor)
 Removes all items based on the functor. The functor should return true if the item is deleted or false if the item should stay in the array. Faster function then removeAllOrdered but order is not preserved.
 
void removeAllUnordered (const t_type &object)
 Removes all unordered described by object. This function does not preserve the order of the buffer.
 
bool removeElement (const t_type &element)
 
void removeIndex (t_index_type location)
 
void removeIndexBackSwap (t_index_type location)
 
void removeLast ()
 
void replaceAll (const t_type &var, const t_type &replacement)
 
void replaceIndexRange (t_index_type offset, t_index_type replace_size, const Buffer &buffer)
 
void resize (t_index_type new_size)
 
void reverse ()
 
void reverse (const t_index_type start, const t_index_type end)
 
void setAll (const Buffer &buffer, t_index_type offset, t_index_type other_offset, t_index_type size)
 
void setAll (const Buffer &buffer, t_index_type offset, t_index_type size)
 
template<class t_o_type >
void setAll (const t_o_type *src, t_index_type offset, t_index_type size)
 
template<class t_o_type >
void setAllToValue (const t_o_type &fill_element, const t_index_type offset=0, t_index_type fill_size=Constant< t_index_type >::Invalid)
 
void setSize (const t_index_type new_size, const t_type &fill_element)
 
void setSize (t_index_type new_size)
 
void setUnique ()
 
void setUniquePresorted ()
 
constexpr t_index_type size () const
 
void sort ()
 
t_index_type sortAboutValue (t_index_type value_index)
 
t_index_type sortAboutValue (t_index_type value_index, t_index_type start, t_index_type end)
 
void sortRange (t_index_type start, t_index_type end)
 
void swapAllElements (const t_type &element1, const t_type &element2)
 
void swapElements (const t_type &element1, const t_type &element2)
 
void swapIndices (t_index_type index_1, t_index_type index_2)
 
 ~Buffer ()
 

Static Public Member Functions

static constexpr t_type Type ()
 

Detailed Description

template<class t_type, class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
class NDEVR::Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager >

The equivelent of std::vector but with a bit more control. The basic array unit of the library.


t_type = what the buffer holds t_index_type = the index reference (default uint04 but can be made uint08 for large buffer support) t_memory_allocator = The object in charge of object allocation when creating space t_memory_manager = The thing that actually stores the memory Author: Tyler Parke

Date: 2017-11-19

Constructor & Destructor Documentation

◆ Buffer() [1/8]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
Buffer ( )
inlineconstexpr

Creates an empty buffer

◆ Buffer() [2/8]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
Buffer ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer)
inlineconstexpr

Optimized copy consturctor

◆ Buffer() [3/8]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
Buffer ( Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > && buffer)
inlineconstexprnoexcept

Optimized move constructor

◆ Buffer() [4/8]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
Buffer ( t_index_type size)
inlineexplicit

Constuctor that reserves space. Note that the buffer will still be empty, but allocation will be more efficient using add or inserts.

◆ Buffer() [5/8]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
Buffer ( const t_type * buffer,
t_index_type size )
inlineexplicit

Constuctor that allows for an a start pointer, and size, and adds all elements to the buffer

◆ Buffer() [6/8]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
Buffer ( t_index_type size,
const t_type & fill_object )
inline

Constuctor that allows for a set size, and then fills the buffer with the specified object

◆ Buffer() [7/8]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
Buffer ( std::initializer_list< t_type > l)
inline

Constuctor that allows for an initializer list, allowing { and } to be used

◆ Buffer() [8/8]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
template<class t_iterator >
Buffer ( const t_iterator & begin,
const t_iterator & end )
inline

Constuctor that allows for an iterator begin and end.

◆ ~Buffer()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
~Buffer ( )
inline
    Destructor.

Author: Tyler Parke

Date: 2017-11-19

Member Function Documentation

◆ add() [1/4]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void add ( const t_type & object)
inline

Adds object to the end of the buffer.

Parameters
[in]objectThe object to add to the end.

◆ add() [2/4]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void add ( t_index_type location,
const t_type & object )
inline

Adds and object to a specific location. Equivelent to insert.

Parameters
[in]locationThe index where the object should be inserted.
[in]objectThe object to add to the buffer at the specified location.

◆ add() [3/4]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void add ( t_index_type location,
t_type && object )
inline

Adds an object to a specific location. Equivelent to insert.

Parameters
[in]locationThe index where the object should be inserted.
[in]objectThe object to add to the buffer at the specified location.

◆ add() [4/4]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void add ( t_type && object)
inline

Adds object to the end of the buffer.

Parameters
[in]objectThe object to add to the end.

◆ addAll() [1/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
template<class t_other_memory_allocator , class t_other_index_type , class t_other_memory_manager >
void addAll ( const Buffer< t_type, t_other_index_type, t_other_memory_allocator, t_other_memory_manager > & buffer)
inline

◆ addAll() [2/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void addAll ( const t_type * buffer)
inline

◆ addAll() [3/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void addAll ( const t_type * buffer,
t_index_type buffer_size )
inline

◆ addAndFillSpace()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
template<bool t_managed = false>
void addAndFillSpace ( t_index_type space_to_add,
const t_type & fill_object )
inline

◆ addSpace() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
template<bool t_managed>
void addSpace ( t_index_type location,
t_index_type size )
inline

◆ addSpace() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
template<bool t_managed>
void addSpace ( t_index_type space_to_add)
inline

Adds a space to the end of the buffer.

Parameters
[in]space_to_addThe number of elements to add.

◆ begin() [1/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) begin ( )
inlinenodiscard

◆ begin() [2/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) begin ( ) const
inlinenodiscard

◆ begin() [3/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) begin ( t_index_type index) const
inlinenodiscard

◆ capacity()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
t_index_type capacity ( ) const
inlinenodiscard

◆ clear() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void clear ( )
inline

◆ clear() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void clear ( t_index_type new_capacity)
inline

◆ compare() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
sint04 compare ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & value) const
inlinenodiscard

Compares this Buffer to another to determine their relative ordering.

Parameters
[in]valueThe Buffer to compare to this object.
Returns
Negative if 'value' is less than '', 0 if they are equal, or positive if it is greater.

◆ compare() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
sint04 compare ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & value,
t_index_type start,
t_index_type end ) const
inlinenodiscard

◆ contains() [1/4]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool contains ( const t_type & element) const
inlinenodiscard

◆ contains() [2/4]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool contains ( const t_type & element,
const std::function< bool(const t_type &, const t_type &)> & equal_function ) const
inlinenodiscard

◆ contains() [3/4]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool contains ( const t_type & element,
t_index_type start ) const
inlinenodiscard

◆ contains() [4/4]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool contains ( const t_type & element,
t_index_type start,
t_index_type search_size ) const
inlinenodiscard

◆ count()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
t_index_type count ( const t_type & element) const
inlinenodiscard

◆ end() [1/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) end ( )
inline

◆ end() [2/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) end ( ) const
inlinenodiscard

◆ end() [3/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) end ( t_index_type index)
inline

◆ ensureCapacity()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void ensureCapacity ( t_index_type new_capacity,
bool ensure_not_greater = false,
bool ensure_not_less = true )
inline

◆ equals()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool equals ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer) const
inlinenodiscard

◆ get() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) get ( t_index_type index)
inlinenodiscard

◆ get() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) get ( t_index_type index) const
inlinenodiscard

◆ getAll()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
Buffer getAll ( t_index_type start,
t_index_type size )
inlinenodiscard

◆ getAs()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
template<class t_other_type , class t_other_index_type = uint04, class t_other_memory_allocator = ObjectAllocator<ObjectInfo<t_other_type>::Primitive>, class t_other_memory_manager = BufferAllocator<t_other_type, t_index_type, false>>
Buffer< t_other_type, t_other_index_type, t_other_memory_allocator, t_other_memory_manager > getAs ( ) const
inlinenodiscard

Gets a copy of this buffer, with filled objects t_other_type, where all objects are created using the contents of this buffer.

Returns
a copy of the buffer.

◆ indexOf() [1/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
t_index_type indexOf ( const t_type & element) const
inlinenodiscard

◆ indexOf() [2/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
t_index_type indexOf ( const t_type & element,
t_index_type start_pos ) const
inlinenodiscard

◆ indexOf() [3/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
t_index_type indexOf ( const t_type & element,
t_index_type start_pos,
t_index_type search_size ) const
inlinenodiscard

◆ insert() [1/5]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void insert ( const t_index_type location,
const t_type * buffer )
inline

Inserts data into the buffer, assumed to be null terminated.

Parameters
[in]locationThe offset where the data should be inserted.
[in]bufferThe buffer.

◆ insert() [2/5]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void insert ( t_index_type location,
const t_type & object )
inline

Adds an object to a specific location.

Parameters
[in]locationThe index where the object should be inserted.
[in]objectThe object to add to the buffer at the specified location.

◆ insert() [3/5]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void insert ( t_index_type location,
t_type && object )
inline

Adds an object to a specific location.

Parameters
[in]locationThe index where the object should be inserted.
[in]objectThe object to add to the buffer at the specified location.

◆ insert() [4/5]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void insert ( t_index_type offset,
const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer )
inline

◆ insert() [5/5]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void insert ( t_index_type offset,
const t_type *const buffer,
t_index_type buffer_size )
inline

Inserts data into the buffer.

Parameters
[in]offsetThe offset where the data should be inserted.
[in]bufferThe buffer of objects to insert.
[in]buffer_sizenumber of elements of the data to insert.

◆ isEmpty()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool isEmpty ( ) const
inlinenodiscard

◆ isSorted()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool isSorted ( ) const
inlinenodiscard

◆ isSortedSet()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool isSortedSet ( ) const
inlinenodiscard

◆ last() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) last ( )
inlinenodiscard

◆ last() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) last ( ) const
inlinenodiscard

◆ lastIndexOf()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
t_index_type lastIndexOf ( const t_type & element) const
inlinenodiscard

◆ memoryInterface() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
t_memory_manager & memoryInterface ( )
inlinenodiscardconstexpr

◆ memoryInterface() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
const t_memory_manager & memoryInterface ( ) const
inlinenodiscardconstexpr

◆ memSize()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
t_index_type memSize ( ) const
inlinenodiscard

◆ move()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void move ( t_index_type from,
t_index_type to )
inline

◆ operator const t_type *()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
operator const t_type * ( ) const
inline

Gets the first location of type* in the array.

Returns
A const pointer to the beginning of the array.

◆ operator t_type *()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
operator t_type * ( )
inline

Gets the first location of type* in the array.

Returns
A const pointer to the beginning of the array.

◆ operator!=()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool operator!= ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer) const
inlinenodiscard

◆ operator+() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
Buffer operator+ ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & value) const
inlinenodiscard

◆ operator+() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
Buffer operator+ ( const t_type & element) const
inlinenodiscard

◆ operator+=() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
Buffer & operator+= ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & value)
inline

◆ operator+=() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
const Buffer & operator+= ( const t_type & element)
inline

◆ operator<()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool operator< ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer) const
inlinenodiscard

◆ operator<=()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool operator<= ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer) const
inlinenodiscard

◆ operator=() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
Buffer & operator= ( Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > && buffer)
inlinenoexcept

◆ operator=() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
Buffer & operator= ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer)
inline

◆ operator==()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool operator== ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer) const
inlinenodiscard

◆ operator>()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool operator> ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer) const
inlinenodiscard

◆ operator>=()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool operator>= ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer) const
inlinenodiscard

◆ operator[]() [1/4]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) operator[] ( const int index)
inlinenodiscard

◆ operator[]() [2/4]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) operator[] ( const int index) const
inlinenodiscard

◆ operator[]() [3/4]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) operator[] ( const t_index_type index)
inlinenodiscard

◆ operator[]() [4/4]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) operator[] ( const t_index_type value) const
inlinenodiscard

◆ primitiveSort()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void primitiveSort ( )
inline

◆ ptr() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) ptr ( )
inlinenodiscard

◆ ptr() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
decltype(auto) ptr ( ) const
inlinenodiscard

◆ removeAllIndex()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void removeAllIndex ( t_index_type start,
t_index_type end )
inline

◆ removeAllIndices()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
template<class t_range_buffer >
void removeAllIndices ( const t_range_buffer & ranges)
inline

◆ removeAllOrdered()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void removeAllOrdered ( const t_type & object)
inline

Removes all instances of the object. Function is slower than removeAllUnordered but order is preserved.

Parameters
[in]objectThe object.

◆ removeAllOrderedFn()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
template<class t_functor >
void removeAllOrderedFn ( const t_functor & functor)
inline

Removes all items based on the functor. The functor should return true if the item is deleted or false if the item should stay in the array. Function is slower than removeAllUnordered but order is preserved.

Parameters
[in]functorA functor that takes a value and returns true if value is to be removed, or false otherwise.

◆ removeAllUnordered() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
template<class t_functor >
void removeAllUnordered ( const t_functor & functor)
inline

Removes all items based on the functor. The functor should return true if the item is deleted or false if the item should stay in the array. Faster function then removeAllOrdered but order is not preserved.

Warning
This function does not preserve the order of the buffer.
Parameters
[in]functorA functor that takes a value and returns true if value is to be removed, or false otherwise.

◆ removeAllUnordered() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void removeAllUnordered ( const t_type & object)
inline

Removes all unordered described by object. This function does not preserve the order of the buffer.

Warning
This function does not preserve the order of the buffer.
Parameters
[in]objectThe object to remove.

◆ removeElement()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
bool removeElement ( const t_type & element)
inline

◆ removeIndex()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void removeIndex ( t_index_type location)
inline

◆ removeIndexBackSwap()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void removeIndexBackSwap ( t_index_type location)
inline

◆ removeLast()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void removeLast ( )
inline

◆ replaceAll()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void replaceAll ( const t_type & var,
const t_type & replacement )
inline

◆ replaceIndexRange()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void replaceIndexRange ( t_index_type offset,
t_index_type replace_size,
const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer )
inline

◆ resize()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void resize ( t_index_type new_size)
inline

◆ reverse() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void reverse ( )
inline

◆ reverse() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void reverse ( const t_index_type start,
const t_index_type end )
inline

◆ setAll() [1/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void setAll ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer,
t_index_type offset,
t_index_type other_offset,
t_index_type size )
inline

◆ setAll() [2/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void setAll ( const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer,
t_index_type offset,
t_index_type size )
inline

◆ setAll() [3/3]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
template<class t_o_type >
void setAll ( const t_o_type * src,
t_index_type offset,
t_index_type size )
inline

◆ setAllToValue()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
template<class t_o_type >
void setAllToValue ( const t_o_type & fill_element,
const t_index_type offset = 0,
t_index_type fill_size = Constant<t_index_type>::Invalid )
inline

◆ setSize() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void setSize ( const t_index_type new_size,
const t_type & fill_element )
inline

◆ setSize() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void setSize ( t_index_type new_size)
inline

◆ setUnique()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void setUnique ( )
inline

◆ setUniquePresorted()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void setUniquePresorted ( )
inline

◆ size()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
t_index_type size ( ) const
inlinenodiscardconstexpr

◆ sort()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void sort ( )
inline

◆ sortAboutValue() [1/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
t_index_type sortAboutValue ( t_index_type value_index)
inline

◆ sortAboutValue() [2/2]

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
t_index_type sortAboutValue ( t_index_type value_index,
t_index_type start,
t_index_type end )
inline

◆ sortRange()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void sortRange ( t_index_type start,
t_index_type end )
inline

◆ swapAllElements()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void swapAllElements ( const t_type & element1,
const t_type & element2 )
inline

◆ swapElements()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void swapElements ( const t_type & element1,
const t_type & element2 )
inline

◆ swapIndices()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
void swapIndices ( t_index_type index_1,
t_index_type index_2 )
inline

◆ Type()

template<class t_type , class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_type>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_type, t_index_type, false>>
static constexpr t_type Type ( )
inlinestaticnodiscardconstexpr

The documentation for this class was generated from the following file: