Open CASCADE Technology 6.6.0
|
#include <NCollection_Stack.hxx>
Public Types | |
typedef NCollection_TListNode < TheItemType > | StackNode |
typedef NCollection_TListIterator < TheItemType > | Iterator |
Public Member Functions | |
NCollection_Stack (const Handle< NCollection_BaseAllocator > &theAllocator=0L) | |
Constructor. | |
NCollection_Stack (const NCollection_Stack &theOther) | |
Copy constructor. | |
virtual Standard_Integer | Size (void) const |
Size - Number of items. | |
Standard_Integer | Depth (void) const |
Depth - Number of items. | |
virtual void | Assign (const NCollection_BaseCollection< TheItemType > &theOther) |
Replace this list by the items of theOther collection. | |
NCollection_Stack & | operator= (const NCollection_Stack &theOther) |
Replace this list by the items of theOther Stack. | |
void | Clear (void) |
Clear this stack. | |
const TheItemType & | Top (void) const |
Top item - constant. | |
TheItemType & | ChangeTop (void) |
Top item - variable. | |
void | Push (const TheItemType &theItem) |
Push one item. | |
void | Pop (void) |
Pop top item. | |
~NCollection_Stack (void) | |
Destructor - clears the List. |
Purpose: A stack is a structure where item can be added and removed from the top. Like a stack of plates in a kitchen. The last entered item will be be the first removed. This is called a LIFO (last In First Out). Inherits BaseList, adding the data item to each node.
typedef NCollection_TListIterator<TheItemType> NCollection_Stack< TheItemType >::Iterator |
Reimplemented from NCollection_BaseList.
typedef NCollection_TListNode<TheItemType> NCollection_Stack< TheItemType >::StackNode |
NCollection_Stack< TheItemType >::NCollection_Stack | ( | const Handle< NCollection_BaseAllocator > & | theAllocator = 0L | ) | [inline] |
NCollection_Stack< TheItemType >::NCollection_Stack | ( | const NCollection_Stack< TheItemType > & | theOther | ) | [inline] |
NCollection_Stack< TheItemType >::~NCollection_Stack | ( | void | ) | [inline] |
virtual void NCollection_Stack< TheItemType >::Assign | ( | const NCollection_BaseCollection< TheItemType > & | theOther | ) | [inline, virtual] |
Implements NCollection_BaseCollection< TheItemType >.
TheItemType& NCollection_Stack< TheItemType >::ChangeTop | ( | void | ) | [inline] |
void NCollection_Stack< TheItemType >::Clear | ( | void | ) | [inline] |
Standard_Integer NCollection_Stack< TheItemType >::Depth | ( | void | ) | const [inline] |
NCollection_Stack& NCollection_Stack< TheItemType >::operator= | ( | const NCollection_Stack< TheItemType > & | theOther | ) | [inline] |
void NCollection_Stack< TheItemType >::Pop | ( | void | ) | [inline] |
void NCollection_Stack< TheItemType >::Push | ( | const TheItemType & | theItem | ) | [inline] |
virtual Standard_Integer NCollection_Stack< TheItemType >::Size | ( | void | ) | const [inline, virtual] |
Implements NCollection_BaseCollection< TheItemType >.
const TheItemType& NCollection_Stack< TheItemType >::Top | ( | void | ) | const [inline] |