XII Release 0.1.0
Loading...
Searching...
No Matches
xiiDeque< T, AllocatorWrapper, Construct > Class Template Reference

#include <Deque.h>

Inheritance diagram for xiiDeque< T, AllocatorWrapper, Construct >:
[legend]

Public Member Functions

 xiiDeque (xiiAllocator *pAllocator)
 xiiDeque (const xiiDeque< T, AllocatorWrapper, Construct > &other)
 xiiDeque (const xiiDequeBase< T, Construct > &other)
 xiiDeque (xiiDeque< T, AllocatorWrapper, Construct > &&other)
 xiiDeque (xiiDequeBase< T, Construct > &&other)
void operator= (const xiiDeque< T, AllocatorWrapper, Construct > &rhs)
void operator= (const xiiDequeBase< T, Construct > &rhs)
void operator= (xiiDeque< T, AllocatorWrapper, Construct > &&rhs)
void operator= (xiiDequeBase< T, Construct > &&rhs)
Public Member Functions inherited from xiiDequeBase< T, true >
void Clear ()
 Destructs all elements and sets the count to zero. Does not deallocate any data.
void Reserve (xiiUInt32 uiCount)
void Compact ()
void Swap (xiiDequeBase< T, Construct > &other)
 swaps the contents of this deque with another one
void SetCount (xiiUInt32 uiCount)
void SetCountUninitialized (xiiUInt32 uiCount)
 \Same as SetCount(), but new elements do not get default constructed.
void EnsureCount (xiiUInt32 uiCount)
T & operator[] (xiiUInt32 uiIndex)
 Accesses the n-th element in the deque.
T & ExpandAndGetRef ()
 Grows the deque by one element and returns a reference to the newly created element.
void PushBack ()
 Adds one default constructed element to the back of the deque.
void PopBack (xiiUInt32 uiElements=1)
 Removes the last element from the deque.
void PushFront (const T &element)
 Adds one element to the front of the deque.
void PopFront (xiiUInt32 uiElements=1)
 Removes the first element from the deque.
bool IsEmpty () const
 Checks whether no elements are active in the deque.
xiiUInt32 GetCount () const
 Returns the number of active elements in the deque.
const T & PeekFront () const
 Returns the first element.
const T & PeekBack () const
 Returns the last element.
bool Contains (const T &value) const
 Checks whether there is any element in the deque with the given value.
xiiUInt32 IndexOf (const T &value, xiiUInt32 uiStartIndex=0) const
 Returns the first index at which an element with the given value could be found or xiiInvalidIndex if nothing was found.
xiiUInt32 LastIndexOf (const T &value, xiiUInt32 uiStartIndex=xiiInvalidIndex) const
 Returns the last index at which an element with the given value could be found or xiiInvalidIndex if nothing was found.
void RemoveAtAndSwap (xiiUInt32 uiIndex)
 Removes the element at the given index and fills the gap with the last element in the deque.
void RemoveAtAndCopy (xiiUInt32 uiIndex)
 Removes the element at index and fills the gap by shifting all following elements.
bool RemoveAndCopy (const T &value)
 Removes the first occurrence of value and fills the gap by shifting all following elements.
bool RemoveAndSwap (const T &value)
 Removes the first occurrence of value and fills the gap with the last element in the deque.
void InsertAt (xiiUInt32 uiIndex, const T &value)
 Inserts value at index by shifting all following elements. Valid insert positions are [0; GetCount].
void Sort (const Comparer &comparer)
 Sort with explicit comparer.
xiiAllocator * GetAllocator () const
 Returns the allocator that is used by this instance.
xiiUInt32 GetContiguousRange (xiiUInt32 uiStartIndex) const
bool operator== (const xiiDequeBase< T, Construct > &rhs) const
 Comparison operator.
xiiUInt64 GetHeapMemoryUsage () const
 Returns the amount of bytes that are currently allocated on the heap.

Additional Inherited Members

Public Types inherited from xiiDequeBase< T, true >
using const_iterator
using const_reverse_iterator
using iterator
using reverse_iterator
Protected Member Functions inherited from xiiDequeBase< T, true >
 xiiDequeBase (xiiAllocator *pAllocator)
 No memory is allocated during construction.
 ~xiiDequeBase ()
 Destructor.
void operator= (const xiiDequeBase< T, Construct > &rhs)
 Assignment operator.

Detailed Description

template<typename T, typename AllocatorWrapper = xiiDefaultAllocatorWrapper, bool Construct = true>
class xiiDeque< T, AllocatorWrapper, Construct >
See also
xiiDequeBase

The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Containers/Deque.h
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Containers/Implementation/Deque_inl.h