
Stack with fixed number of elements. More...
#include <gecode/support/static-stack.hpp>
Public Member Functions | |
| StaticStack (A &a, int n) | |
| Initialize for n elements. | |
| ~StaticStack (void) | |
| Release memory. | |
| void | reset (void) |
| Reset stack (pop all elements). | |
| bool | empty (void) const |
| Test whether stack is empty. | |
| int | entries (void) const |
| Return number of entries currently on stack. | |
| T | pop (void) |
| Pop topmost element from stack and return it. | |
| T & | top (void) const |
| Return element on top of stack. | |
| T & | last (void) const |
| Return element that has just been popped. | |
| void | push (const T &x) |
| Push element x on top of stack. | |
| StaticStack (const StaticStack &s)=delete | |
| Copy constructor (disabled). | |
| const StaticStack & | operator= (const StaticStack &)=delete |
| Assignment operator (disabled). | |
Static Public Member Functions | |
| static void * | operator new (size_t s)=delete |
| Allocate memory from heap (disabled). | |
| static void | operator delete (void *p)=delete |
| Free memory allocated from heap (disabled). | |
Stack with fixed number of elements.
Definition at line 42 of file static-stack.hpp.
|
inline |
Initialize for n elements.
Definition at line 86 of file static-stack.hpp.
|
inline |
Release memory.
Definition at line 91 of file static-stack.hpp.
|
delete |
Copy constructor (disabled).
|
inline |
Reset stack (pop all elements).
Definition at line 109 of file static-stack.hpp.
|
inline |
Test whether stack is empty.
Definition at line 97 of file static-stack.hpp.
|
inline |
Return number of entries currently on stack.
Definition at line 103 of file static-stack.hpp.
|
inline |
Pop topmost element from stack and return it.
Definition at line 115 of file static-stack.hpp.
|
inline |
Return element on top of stack.
Definition at line 122 of file static-stack.hpp.
|
inline |
Return element that has just been popped.
Definition at line 129 of file static-stack.hpp.
|
inline |
Push element x on top of stack.
Definition at line 136 of file static-stack.hpp.
|
staticdelete |
Allocate memory from heap (disabled).
|
staticdelete |
Free memory allocated from heap (disabled).
|
delete |
Assignment operator (disabled).