#include <GrowableStack.hpp>
Public Types | |
using | ElementType = T |
Element type. More... | |
using | CountType = std::size_t |
Count type. More... | |
Public Member Functions | |
GrowableStack ()=default | |
GrowableStack (const GrowableStack &other)=delete | |
GrowableStack (GrowableStack &&other)=delete | |
~GrowableStack () noexcept | |
GrowableStack & | operator= (const GrowableStack ©)=delete |
GrowableStack & | operator= (GrowableStack &©)=delete |
void | push (const ElementType &element) |
Pushes the given elements onto this stack. More... | |
ElementType | top () const |
Accesses the "top" element. More... | |
void | pop () noexcept |
Pops the "top" element. More... | |
PLAYRHO_CONSTEXPR CountType | size () const noexcept |
Gets the current size in numbers of elements. More... | |
PLAYRHO_CONSTEXPR CountType | capacity () const noexcept |
Gets the capacity in number of elements. More... | |
PLAYRHO_CONSTEXPR bool | empty () const noexcept |
Whether this stack is empty. More... | |
Static Public Member Functions | |
static PLAYRHO_CONSTEXPR CountType | GetInitialCapacity () noexcept |
Gets the initial capacity. More... | |
static PLAYRHO_CONSTEXPR CountType | GetBufferGrowthRate () noexcept |
Gets the buffer growth rate. More... | |
Detailed Description
template<typename T, std::size_t N>
class playrho::GrowableStack< T, N >
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.
Definition at line 34 of file GrowableStack.hpp.
Member Typedef Documentation
◆ ElementType
using playrho::GrowableStack< T, N >::ElementType = T |
Element type.
Definition at line 39 of file GrowableStack.hpp.
◆ CountType
using playrho::GrowableStack< T, N >::CountType = std::size_t |
Count type.
Definition at line 42 of file GrowableStack.hpp.
Constructor & Destructor Documentation
◆ GrowableStack() [1/3]
|
default |
◆ GrowableStack() [2/3]
|
delete |
◆ GrowableStack() [3/3]
|
delete |
◆ ~GrowableStack()
|
inlinenoexcept |
Definition at line 62 of file GrowableStack.hpp.
Member Function Documentation
◆ GetInitialCapacity()
|
inlinestaticnoexcept |
Gets the initial capacity.
Definition at line 45 of file GrowableStack.hpp.
◆ GetBufferGrowthRate()
|
inlinestaticnoexcept |
Gets the buffer growth rate.
Definition at line 51 of file GrowableStack.hpp.
◆ operator=() [1/2]
|
delete |
◆ operator=() [2/2]
|
delete |
◆ push()
|
inline |
Pushes the given elements onto this stack.
Definition at line 76 of file GrowableStack.hpp.
◆ top()
|
inline |
Accesses the "top" element.
- Warning
- Behavior is undefined if this stack doesn't already have at least one value pushed onto it.
Definition at line 97 of file GrowableStack.hpp.
◆ pop()
|
inlinenoexcept |
Pops the "top" element.
Definition at line 104 of file GrowableStack.hpp.
◆ size()
|
inlinenoexcept |
Gets the current size in numbers of elements.
Definition at line 111 of file GrowableStack.hpp.
◆ capacity()
|
inlinenoexcept |
Gets the capacity in number of elements.
Definition at line 117 of file GrowableStack.hpp.
◆ empty()
|
inlinenoexcept |
Whether this stack is empty.
Definition at line 123 of file GrowableStack.hpp.
The documentation for this class was generated from the following file:
- Common/GrowableStack.hpp