91 return this->stackArray[this->stackArray.Size() - 1 - index];
131 this->stackArray.Clear();
141 return this->stackArray.Size();
151 return this->stackArray.IsEmpty();
161 this->stackArray.EraseIndex(i);
171 this->stackArray.Append(e);
181 return this->stackArray.Back();
191 TYPE e = this->stackArray.Back();
192 this->stackArray.EraseIndex(this->stackArray.Size() - 1);
Nebula's dynamic array class.
Definition array.h:60
Nebula's stack class (a FILO container).
Definition stack.h:19
Stack()
constructor
Definition stack.h:60
void Push(const TYPE &e)
push an element on the stack
Definition stack.h:169
TYPE Pop()
get topmost element of stack, remove element
Definition stack.h:189
bool Contains(const TYPE &e) const
return true if stack contains element
Definition stack.h:119
SizeT Size() const
returns number of elements on stack
Definition stack.h:139
void operator=(const Stack< TYPE > &rhs)
assignment operator
Definition stack.h:79
void EraseIndex(const IndexT i)
erase element at index
bool operator!=(const Stack< TYPE > &rhs) const
inequality operator
Definition stack.h:109
bool IsEmpty() const
returns true if stack is empty
Definition stack.h:149
void Clear()
remove all elements from the stack
Definition stack.h:129
TYPE & operator[](IndexT index) const
access element by index, 0 is the topmost element
Definition stack.h:89
TYPE & Peek() const
get reference of topmost element of stack, without removing it
Definition stack.h:179
Stack(const Stack< TYPE > &rhs)
copy constructor
Definition stack.h:69
Array< TYPE > stackArray
Definition stack.h:53
bool operator==(const Stack< TYPE > &rhs) const
equality operator
Definition stack.h:99
A pinned array is an array which manages its own virtual memory.
Definition String.cs:6
static const int InvalidIndex
Definition types.h:54
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48