FixedSizeDeque

Engine/source/core/util/tFixedSizeDeque.h

A double-ended queue with a fixed number of entries set at construction time.

More...

Public Types

T
ValueType 

Type for elements stored in the deque.

Protected Attributes

Public Functions

FixedSizeDeque(U32 bufferSize)
back()

Return the rightmost value in the queue.

Return the leftmost value in the queue.

bool

Remove and return the rightmost value in the queue.

Remove and return the leftmost value in the queue.

Append "value" to the right end of the queue.

Prepend "value" to the left end of the queue.

Detailed Description

A double-ended queue with a fixed number of entries set at construction time.

Implemented as an array.

Parameters:

T

Element type of the queue.

Public Types

typedef T ValueType 

Type for elements stored in the deque.

Protected Attributes

ValueType * mBuffer 
U32 mBufferSize 
U32 mEnd 
U32 mSize 
U32 mStart 

Index.

Public Functions

FixedSizeDeque(U32 bufferSize)

~FixedSizeDeque()

back()

Return the rightmost value in the queue.

capacity()

clear()

front()

Return the leftmost value in the queue.

isEmpty()

popBack()

Remove and return the rightmost value in the queue.

popFront()

Remove and return the leftmost value in the queue.

pushBack(const ValueType & value)

Append "value" to the right end of the queue.

pushFront(const ValueType & value)

Prepend "value" to the left end of the queue.

size()