Template Class ArrayStack
Defined in File ArrayStack.h
Class Documentation
-
template<class T>
class ArrayStack a STACK realized with a vector of a given capacity
Public Functions
-
explicit ArrayStack(std::size_t dim)
the empty stack of at most dim items
-
ArrayStack(const ArrayStack &other)
-
ArrayStack(ArrayStack &&other) noexcept
the items of other, which is left empty with no capacity
-
ArrayStack &operator=(ArrayStack other) noexcept
-
void swap(ArrayStack &other) noexcept
-
bool empty(void) const
-
T pop(void)
removes the item on top and returns it
- Pre:
the stack is not empty
- Post:
one item less, the old top returned
-
std::size_t size(void) const
the number of items
-
std::size_t capacity(void) const
the maximum number of items
-
bool operator==(const ArrayStack &o) const
the same items in the same order, whatever the capacities
-
inline const_iterator begin(void) const
-
inline const_iterator end(void) const
-
inline const_iterator cbegin(void) const
-
inline const_iterator cend(void) const
-
explicit ArrayStack(std::size_t dim)