nlib
|
The class for realloc
-based implementations of queues with POD
-type elements.
More...
#include "nn/nlib/ReallocVec.h"
Public Types | |
typedef ReallocVec< T >::ReallocFunc | ReallocFunc |
The type for functions corresponding to realloc . | |
Public Member Functions | |
ReallocQueue () noexcept | |
Uses std::realloc with the default constructor. | |
ReallocQueue (ReallocFunc func) noexcept | |
Enables the user to specify the realloc function with the constructor. More... | |
void | swap (ReallocQueue &rhs) noexcept |
Swaps queues. More... | |
ReallocFunc | GetRealloc () const noexcept |
Gets the specified realloc function. More... | |
size_t | size () const noexcept |
Gets the size of the queue. More... | |
bool | empty () const noexcept |
Determines whether the queue is empty. More... | |
bool | push (const T &val) noexcept |
Adds an element to the queue. More... | |
bool | pop () noexcept |
Deletes the first element in the queue. More... | |
T & | front () |
Gets the first element in the queue. More... | |
bool | pop (T *v) noexcept |
Gets the first element in the queue and then deletes it. More... | |
The class for realloc
-based implementations of queues with POD
-type elements.
T | The element type. This type must be POD . |
realloc
. Definition at line 199 of file ReallocVec.h.
|
inlineexplicitnoexcept |
Enables the user to specify the realloc
function with the constructor.
[in] | func | The realloc function. |
Definition at line 203 of file ReallocVec.h.
|
inlinenoexcept |
Determines whether the queue is empty.
true
if empty. Definition at line 245 of file ReallocVec.h.
|
inline |
Gets the first element in the queue.
Definition at line 260 of file ReallocVec.h.
|
inlinenoexcept |
Gets the specified realloc
function.
realloc
function. Definition at line 239 of file ReallocVec.h.
|
inlinenoexcept |
Deletes the first element in the queue.
true
when successful. Definition at line 249 of file ReallocVec.h.
|
inlinenoexcept |
Gets the first element in the queue and then deletes it.
[in] | v | The pointer to where the first element in the queue is stored. |
true
when successful. Definition at line 270 of file ReallocVec.h.
|
inlinenoexcept |
Adds an element to the queue.
[in] | val | The element to add. |
true
when successful. Definition at line 248 of file ReallocVec.h.
|
inlinenoexcept |
Gets the size of the queue.
Definition at line 242 of file ReallocVec.h.
|
inlinenoexcept |
Swaps queues.
[in] | rhs | The queue to swap. |
Definition at line 233 of file ReallocVec.h.
© 2012-2017 Nintendo Co., Ltd. All rights reserved.