#include <playrho/GrowableStack.hpp>
Public Types | |
using | CountType = std::size_t |
Count type. | |
using | ElementType = T |
Element type. | |
Public Member Functions | |
GrowableStack (const GrowableStack &other)=delete | |
GrowableStack (GrowableStack &&other)=delete | |
constexpr CountType | capacity () const noexcept |
Gets the capacity in number of elements. | |
constexpr bool | empty () const noexcept |
Whether this stack is empty. | |
GrowableStack & | operator= (const GrowableStack ©)=delete |
GrowableStack & | operator= (GrowableStack &©)=delete |
void | pop () noexcept |
Pops the "top" element. More... | |
void | push (const ElementType &element) |
Pushes the given elements onto this stack. | |
constexpr CountType | size () const noexcept |
Gets the current size in numbers of elements. | |
ElementType | top () const |
Accesses the "top" element. More... | |
Static Public Member Functions | |
static constexpr CountType | GetBufferGrowthRate () noexcept |
Gets the buffer growth rate. | |
static constexpr CountType | GetInitialCapacity () noexcept |
Gets the initial capacity. | |
This is a growable LIFO stack with an initial capacity of N. If the stack size exceeds the initial capacity, the heap is used to increase the size of the stack.
|
inlinenoexcept |
Pops the "top" element.
size()
is greater than zero. Referenced by playrho::d2::Query(), and playrho::d2::RayCast().
|
inline |
Accesses the "top" element.
size()
is greater than zero. Referenced by playrho::d2::Query(), and playrho::d2::RayCast().