Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions
NCollection_Queue< TheItemType > Class Template Reference

#include <NCollection_Queue.hxx>

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

Public Types

typedef NCollection_TListNode
< TheItemType > 
QueueNode
 
typedef
NCollection_TListIterator
< TheItemType > 
Iterator
 

Public Member Functions

 NCollection_Queue (const Handle< NCollection_BaseAllocator > &theAllocator=0L)
 Constructor. More...
 
 NCollection_Queue (const NCollection_Queue &theOther)
 Copy constructor. More...
 
virtual Standard_Integer Size (void) const
 Size - Number of items. More...
 
Standard_Integer Length (void) const
 Length - number of items. More...
 
virtual void Assign (const NCollection_BaseCollection< TheItemType > &theOther)
 Replace this list by the items of theOther collection. More...
 
NCollection_Queueoperator= (const NCollection_Queue &theOther)
 Replace this list by the items of theOther queue. More...
 
void Clear (void)
 Clear this queue. More...
 
const TheItemType & Front (void) const
 Frontal item - constant. More...
 
TheItemType & ChangeFront (void)
 Frontal item - variable. More...
 
void Push (const TheItemType &theItem)
 Push one item. More...
 
void Pop (void)
 Pop first item. More...
 
 ~NCollection_Queue (void)
 Destructor - clears the List. More...
 
- Public Member Functions inherited from NCollection_BaseCollection< TheItemType >
 NCollection_BaseCollection (const Handle< NCollection_BaseAllocator > &theAllocator=0L)
 Common for all collections constructor takes care of theAllocator. More...
 
virtual ~NCollection_BaseCollection (void)
 Destructor - must be implemented to release the memory. More...
 
const Handle
< NCollection_BaseAllocator > & 
Allocator () const
 Returns attached allocator. More...
 
- Public Member Functions inherited from NCollection_BaseList
Standard_Integer Extent (void) const
 
Standard_Boolean IsEmpty (void) const
 

Additional Inherited Members

- Protected Member Functions inherited from NCollection_BaseCollection< TheItemType >
const Handle
< NCollection_BaseAllocator > & 
IterAllocator (void) const
 
void exchangeAllocators (NCollection_BaseCollection &theOther)
 Exchange allocators of two collections. More...
 
- Protected Member Functions inherited from NCollection_BaseList
 NCollection_BaseList (void)
 
void PClear (NCollection_DelListNode fDel, Handle< NCollection_BaseAllocator > &theAllocator)
 
const NCollection_ListNodePFirst (void) const
 
const NCollection_ListNodePLast (void) const
 
void PAppend (NCollection_ListNode *theNode)
 
void PAppend (NCollection_ListNode *theNode, Iterator &theIt)
 
void PAppend (NCollection_BaseList &theOther)
 
void PPrepend (NCollection_ListNode *theNode)
 
void PPrepend (NCollection_BaseList &theOther)
 
void PRemoveFirst (NCollection_DelListNode fDel, Handle< NCollection_BaseAllocator > &theAllocator)
 
void PRemove (Iterator &theIter, NCollection_DelListNode fDel, Handle< NCollection_BaseAllocator > &theAllocator)
 
void PInsertBefore (NCollection_ListNode *theNode, Iterator &theIter)
 
void PInsertBefore (NCollection_BaseList &theOther, Iterator &theIter)
 
void PInsertAfter (NCollection_ListNode *theNode, Iterator &theIter)
 
void PInsertAfter (NCollection_BaseList &theOther, Iterator &theIter)
 
void PReverse ()
 
- Protected Attributes inherited from NCollection_BaseCollection< TheItemType >
Handle< NCollection_BaseAllocatormyAllocator
 
- Protected Attributes inherited from NCollection_BaseList
NCollection_ListNodemyFirst
 
NCollection_ListNodemyLast
 
Standard_Integer myLength
 

Detailed Description

template<class TheItemType>
class NCollection_Queue< TheItemType >

Purpose: A queue is a structure where Items are added at the end and removed from the front. The first entered Item will be the first removed. This is called a FIFO (First In First Out). Inherits BaseList, adds the data item to each node.

Member Typedef Documentation

template<class TheItemType >
typedef NCollection_TListIterator<TheItemType> NCollection_Queue< TheItemType >::Iterator
template<class TheItemType >
typedef NCollection_TListNode<TheItemType> NCollection_Queue< TheItemType >::QueueNode

Constructor & Destructor Documentation

template<class TheItemType >
NCollection_Queue< TheItemType >::NCollection_Queue ( const Handle< NCollection_BaseAllocator > &  theAllocator = 0L)
inline

Constructor.

template<class TheItemType >
NCollection_Queue< TheItemType >::NCollection_Queue ( const NCollection_Queue< TheItemType > &  theOther)
inline

Copy constructor.

template<class TheItemType >
NCollection_Queue< TheItemType >::~NCollection_Queue ( void  )
inline

Destructor - clears the List.

Member Function Documentation

template<class TheItemType >
virtual void NCollection_Queue< TheItemType >::Assign ( const NCollection_BaseCollection< TheItemType > &  theOther)
inlinevirtual

Replace this list by the items of theOther collection.

Implements NCollection_BaseCollection< TheItemType >.

template<class TheItemType >
TheItemType& NCollection_Queue< TheItemType >::ChangeFront ( void  )
inline

Frontal item - variable.

template<class TheItemType >
void NCollection_Queue< TheItemType >::Clear ( void  )
inline

Clear this queue.

template<class TheItemType >
const TheItemType& NCollection_Queue< TheItemType >::Front ( void  ) const
inline

Frontal item - constant.

template<class TheItemType >
Standard_Integer NCollection_Queue< TheItemType >::Length ( void  ) const
inline

Length - number of items.

template<class TheItemType >
NCollection_Queue& NCollection_Queue< TheItemType >::operator= ( const NCollection_Queue< TheItemType > &  theOther)
inline

Replace this list by the items of theOther queue.

template<class TheItemType >
void NCollection_Queue< TheItemType >::Pop ( void  )
inline

Pop first item.

template<class TheItemType >
void NCollection_Queue< TheItemType >::Push ( const TheItemType &  theItem)
inline

Push one item.

template<class TheItemType >
virtual Standard_Integer NCollection_Queue< TheItemType >::Size ( void  ) const
inlinevirtual

Size - Number of items.

Implements NCollection_BaseCollection< TheItemType >.


The documentation for this class was generated from the following file: