Open CASCADE Technology 6.6.0
Public Types | Public Member Functions
NCollection_Stack< TheItemType > Class Template Reference

#include <NCollection_Stack.hxx>

Inheritance diagram for NCollection_Stack< TheItemType >:
Inheritance graph
[legend]

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_Stackoperator= (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.

Detailed Description

template<class TheItemType>
class NCollection_Stack< TheItemType >

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.


Member Typedef Documentation

template<class TheItemType >
typedef NCollection_TListIterator<TheItemType> NCollection_Stack< TheItemType >::Iterator

Reimplemented from NCollection_BaseList.

template<class TheItemType >
typedef NCollection_TListNode<TheItemType> NCollection_Stack< TheItemType >::StackNode

Constructor & Destructor Documentation

template<class TheItemType >
NCollection_Stack< TheItemType >::NCollection_Stack ( const Handle< NCollection_BaseAllocator > &  theAllocator = 0L) [inline]
template<class TheItemType >
NCollection_Stack< TheItemType >::NCollection_Stack ( const NCollection_Stack< TheItemType > &  theOther) [inline]
template<class TheItemType >
NCollection_Stack< TheItemType >::~NCollection_Stack ( void  ) [inline]

Member Function Documentation

template<class TheItemType >
virtual void NCollection_Stack< TheItemType >::Assign ( const NCollection_BaseCollection< TheItemType > &  theOther) [inline, virtual]
template<class TheItemType >
TheItemType& NCollection_Stack< TheItemType >::ChangeTop ( void  ) [inline]
template<class TheItemType >
void NCollection_Stack< TheItemType >::Clear ( void  ) [inline]
template<class TheItemType >
Standard_Integer NCollection_Stack< TheItemType >::Depth ( void  ) const [inline]
template<class TheItemType >
NCollection_Stack& NCollection_Stack< TheItemType >::operator= ( const NCollection_Stack< TheItemType > &  theOther) [inline]
template<class TheItemType >
void NCollection_Stack< TheItemType >::Pop ( void  ) [inline]
template<class TheItemType >
void NCollection_Stack< TheItemType >::Push ( const TheItemType &  theItem) [inline]
template<class TheItemType >
virtual Standard_Integer NCollection_Stack< TheItemType >::Size ( void  ) const [inline, virtual]
template<class TheItemType >
const TheItemType& NCollection_Stack< TheItemType >::Top ( void  ) const [inline]

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines