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

Stores objects in a first-in, first out queue based Buffer with push and pop functions. More...

#include <QueueBuffer.hpp>

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

Public Member Functions

void clear ()
 
bool empty () const
 
decltype(auto) front ()
 
decltype(auto) front () const
 
t_type & last ()
 
const t_type & last () const
 
constexpr t_memory_manager & memoryInterface ()
 
constexpr const t_memory_manager & memoryInterface () const
 
QueueBufferoperator= (const QueueBuffer &buffer) noexcept
 
QueueBufferoperator= (QueueBuffer &&buffer) noexcept
 
const t_type & operator[] (t_index_type value) const noexcept
 
t_type & operator[] (t_index_type value) noexcept
 
void pop ()
 
void push (const t_type &object)
 
void push (t_type &&object)
 
constexpr QueueBuffer ()
 
constexpr QueueBuffer (const Buffer< t_type, t_memory_allocator, t_memory_manager > &buffer)
 
constexpr QueueBuffer (const QueueBuffer &buffer)
 
constexpr QueueBuffer (QueueBuffer &&buffer) noexcept
 
 QueueBuffer (uint04 size)
 
uint04 size () const
 

Static Public Member Functions

static constexpr t_type Type ()
 

Protected Member Functions

void checkMove ()
 
- Protected Member Functions inherited from Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager >
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 ()
 

Protected Attributes

uint04 m_end
 
uint04 m_start
 

Additional Inherited Members

- Static Protected Member Functions inherited from Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager >
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::QueueBuffer< t_type, t_index_type, t_memory_allocator, t_memory_manager >

Stores objects in a first-in, first out queue based Buffer with push and pop functions.


Constructor & Destructor Documentation

◆ QueueBuffer() [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>>
QueueBuffer ( )
inlineconstexpr

◆ QueueBuffer() [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>>
QueueBuffer ( const QueueBuffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > & buffer)
inlineconstexpr

◆ QueueBuffer() [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>>
QueueBuffer ( const Buffer< t_type, t_memory_allocator, t_memory_manager > & buffer)
inlineconstexpr

◆ QueueBuffer() [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>>
QueueBuffer ( QueueBuffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > && buffer)
inlineconstexprnoexcept

◆ QueueBuffer() [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>>
QueueBuffer ( uint04 size)
inlineexplicit

Member Function Documentation

◆ checkMove()

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 checkMove ( )
inlineprotected

◆ clear()

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

◆ empty()

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 empty ( ) const
inline

◆ front() [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) front ( )
inlinenodiscard

Constructor.

Author: Tyler Parke

Date: 2017-11-19

Parameters: parameter1 - The first parameter.

◆ front() [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) front ( ) const
inlinenodiscard

Constructor.

Author: Tyler Parke

Date: 2017-11-19

Parameters: parameter1 - The first parameter.

◆ 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>>
t_type & last ( )
inline

◆ 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>>
const t_type & last ( ) const
inline

◆ 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

◆ 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>>
QueueBuffer & operator= ( const QueueBuffer< 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>>
QueueBuffer & operator= ( QueueBuffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > && buffer)
inlinenoexcept

◆ 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>>
const t_type & operator[] ( t_index_type value) const
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>>
t_type & operator[] ( t_index_type value)
inlinenoexcept

◆ pop()

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 pop ( )
inline

◆ push() [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 push ( const t_type & object)
inline

◆ push() [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 push ( t_type && object)
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>>
uint04 size ( ) const
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

Member Data Documentation

◆ m_end

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>>
uint04 m_end
protected

◆ m_start

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>>
uint04 m_start
protected

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