-
首页
-
C4D R23.110 C++ SDK
Queue< T > Class Template Reference
#include <queue.h>
详细描述
template<typename T>
class maxon::Queue< T >
A
Queue
that holds elements of type T, stored in a circular buffer. Supports access from both ends.
Member Typedef Documentation
◆
ValueType
构造函数 & 析构函数文档编制
◆
Queue()
[1/3]
Default constructor. Creates an empty queue.
◆
Queue()
[2/3]
Deleted copy constructor.
◆
Queue()
[3/3]
Move constructor.
◆
~Queue()
The destructor resets the queue.
成员函数文档编制
◆
operator=()
[1/2]
Deleted copy assignment.
◆
operator=()
[2/2]
Move assignment.
◆
GetCount()
Returns the number of elements in the queue.
◆
IsEmpty()
Checks if the queue contains no elements.
◆
IsPopulated()
Bool
IsPopulated
|
(
|
|
)
|
const
|
Checks if the queue contains any elements.
◆
Peek()
[1/2]
Returns a reference to the element at the front of the queue without removing it, or NO_VALUE if the queue was empty.
◆
Peek()
[2/2]
可选
<const T&> Peek
|
(
|
|
)
|
const
|
◆
PeekBack()
[1/2]
Returns a reference to the element at the back of the queue without removing it, or NO_VALUE if the queue was empty.
◆
PeekBack()
[2/2]
可选
<const T&> PeekBack
|
(
|
|
)
|
const
|
◆
Push()
Pushes an element to the back of the queue.
◆
PushFront()
Pushes an element to the front of the queue.
◆
Emplace()
Constructs an element in-place at the back of the queue with the given arguments as constructor arguments.
◆
EmplaceFront()
Constructs an element in-place at the front of the queue with the given arguments.
◆
Pop()
Returns the element at the front of the queue and removes it, or NO_VALUE if the queue was empty.
◆
PopBack()
Returns the element at the back of the queue and removes it, or NO_VALUE if the queue was empty.
◆
Truncate()
Removes the element at the front of the queue without returning it. Returns true if the operation succeeded, or false if the queue was empty.
◆
TruncateBack()
Removes the element at the back of the queue without returning it. Returns true if the operation succeeded, or false if the queue was empty.
◆
Flush()
Removes all elements from the queue by calling their destructors, but does not de-allocate the memory yet.
◆
Reset()
Removes all elements from the queue by calling their destructors and frees the allocated memory.
◆
AlignAsBlock()
Block
<T> AlignAsBlock
|
(
|
|
)
|
|
Linearizes the internal data storage and returns the elements as a block, from front to back.
◆
CopyFrom()
Copies the queue.
◆
EnsureCapacity()
Ensures that the queue can hold
requestedSize
items without allocating additional memory. Can be used for optimization to pre-allocate a sufficiently large internal buffer instead of growing on-demand.
◆
IncrementIndex()
◆
DecrementIndex()
◆
Linearize()
◆
IsAtFullCapacity()
Bool
IsAtFullCapacity
|
(
|
|
)
|
const
|
|
private
|
◆
CalcNewCapacity()
Int
CalcNewCapacity
|
(
|
Int
|
targetSize
|
)
|
const
|
|
private
|
◆
Grow()
◆
CopyDataToNewBuffer()
Result
<void> CopyDataToNewBuffer
|
(
|
T *
|
destPtr
|
)
|
const
|
|
private
|
◆
MoveDataToNewBuffer()
void MoveDataToNewBuffer
|
(
|
T *
|
destPtr
|
)
|
|
|
private
|
◆
PushToHead()
void PushToHead
|
(
|
T &&
|
value
|
)
|
|
|
private
|
◆
PushToTail()
void PushToTail
|
(
|
T &&
|
value
|
)
|
|
|
private
|
◆
EmplaceAtHead()
void EmplaceAtHead
|
(
|
ARGS &&...
|
args
|
)
|
|
|
private
|
◆
EmplaceAtTail()
void EmplaceAtTail
|
(
|
ARGS &&...
|
args
|
)
|
|
|
private
|
◆
PopFromTail()
◆
PopFromHead()
◆
TruncateTail()
◆
TruncateHead()
Member Data Documentation
◆
GROW_INIT
◆
GROW_FACTOR
◆
_data
◆
_headIndex
◆
_tailIndex
◆
_count
◆
_capacity