OCC Main Page | FoundationClasses | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

FoundationClasses
TKernel
NCollection


FoundationClasses
TKernel
NCollection


NCollection_List< TheItemType > Class Template Reference

#include <NCollection_List.hxx>

Inheritance diagram for NCollection_List< TheItemType >:

Inheritance graph
[legend]

Public Types

typedef NCollection_TListNode<
TheItemType > 
ListNode
typedef NCollection_TListIterator<
TheItemType > 
Iterator

Public Member Functions

 NCollection_List (const Handle(NCollection_BaseAllocator)&theAllocator=0L)
 Constructor.
 NCollection_List (const NCollection_List &theOther)
 Copy constructor.
virtual Standard_Integer Size (void) const
 Size - Number of items.
virtual void Assign (const NCollection_BaseCollection< TheItemType > &theOther)
 Replace this list by the items of theOther collection.
void Assign (const NCollection_List &theOther)
 Replace this list by the items of another list (theOther parameter).
NCollection_Listoperator= (const NCollection_List &theOther)
 Replace this list by the items of theOther list.
void Clear (const Handle(NCollection_BaseAllocator)&theAllocator=0L)
 Clear this list.
const TheItemType & First (void) const
 First item.
const TheItemType & Last (void) const
 Last item.
TheItemType & Append (const TheItemType &theItem)
 Append one item at the end.
void Append (const TheItemType &theItem, Iterator &theIter)
 Append one item at the end and output iterator pointing at the appended item.
void Append (NCollection_List &theOther)
 Append another list at the end.
TheItemType & Prepend (const TheItemType &theItem)
 Prepend one item at the beginning.
void Prepend (NCollection_List &theOther)
 Prepend another list at the beginning.
void RemoveFirst (void)
 RemoveFirst item.
void Remove (Iterator &theIter)
 Remove item.
TheItemType & InsertBefore (const TheItemType &theItem, Iterator &theIter)
 InsertBefore.
void InsertBefore (NCollection_List &theOther, Iterator &theIter)
 InsertBefore.
TheItemType & InsertAfter (const TheItemType &theItem, Iterator &theIter)
 InsertAfter.
void InsertAfter (NCollection_List &theOther, Iterator &theIter)
 InsertAfter.
void Reverse ()
 Reverse the list.
 ~NCollection_List (void)
 Destructor - clears the List.

Private Member Functions

virtual TYPENAME NCollection_BaseCollection<
TheItemType >::Iterator
CreateIterator (void) const
 Creates Iterator for use on BaseCollection.
void appendList (const NCollection_ListNode *pCur)
 append the list headed by the given ListNode
void prependList (const NCollection_ListNode *pCur, Iterator &theIter)
 insert the list headed by the given ListNode before the given iterator

Detailed Description

template<class TheItemType>
class NCollection_List< TheItemType >

Purpose: Simple list to link items together keeping the first and the last one. Inherits BaseList, adding the data item to each node.


Member Typedef Documentation

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

Reimplemented from NCollection_BaseList.

template<class TheItemType>
typedef NCollection_TListNode<TheItemType> NCollection_List< TheItemType >::ListNode
 


Constructor & Destructor Documentation

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

template<class TheItemType>
NCollection_List< TheItemType >::NCollection_List const NCollection_List< TheItemType > &  theOther  )  [inline]
 

template<class TheItemType>
NCollection_List< TheItemType >::~NCollection_List void   )  [inline]
 


Member Function Documentation

template<class TheItemType>
void NCollection_List< TheItemType >::Append NCollection_List< TheItemType > &  theOther  )  [inline]
 

template<class TheItemType>
void NCollection_List< TheItemType >::Append const TheItemType &  theItem,
Iterator theIter
[inline]
 

template<class TheItemType>
TheItemType& NCollection_List< TheItemType >::Append const TheItemType &  theItem  )  [inline]
 

template<class TheItemType>
void NCollection_List< TheItemType >::appendList const NCollection_ListNode pCur  )  [inline, private]
 

template<class TheItemType>
void NCollection_List< TheItemType >::Assign const NCollection_List< TheItemType > &  theOther  )  [inline]
 

template<class TheItemType>
virtual void NCollection_List< TheItemType >::Assign const NCollection_BaseCollection< TheItemType > &  theOther  )  [inline, virtual]
 

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

template<class TheItemType>
virtual TYPENAME NCollection_BaseCollection<TheItemType>::Iterator& NCollection_List< TheItemType >::CreateIterator void   )  const [inline, private, virtual]
 

Implements NCollection_BaseCollection< TheItemType >.

template<class TheItemType>
const TheItemType& NCollection_List< TheItemType >::First void   )  const [inline]
 

template<class TheItemType>
void NCollection_List< TheItemType >::InsertAfter NCollection_List< TheItemType > &  theOther,
Iterator theIter
[inline]
 

template<class TheItemType>
TheItemType& NCollection_List< TheItemType >::InsertAfter const TheItemType &  theItem,
Iterator theIter
[inline]
 

template<class TheItemType>
void NCollection_List< TheItemType >::InsertBefore NCollection_List< TheItemType > &  theOther,
Iterator theIter
[inline]
 

template<class TheItemType>
TheItemType& NCollection_List< TheItemType >::InsertBefore const TheItemType &  theItem,
Iterator theIter
[inline]
 

template<class TheItemType>
const TheItemType& NCollection_List< TheItemType >::Last void   )  const [inline]
 

template<class TheItemType>
NCollection_List& NCollection_List< TheItemType >::operator= const NCollection_List< TheItemType > &  theOther  )  [inline]
 

template<class TheItemType>
void NCollection_List< TheItemType >::Prepend NCollection_List< TheItemType > &  theOther  )  [inline]
 

template<class TheItemType>
TheItemType& NCollection_List< TheItemType >::Prepend const TheItemType &  theItem  )  [inline]
 

template<class TheItemType>
void NCollection_List< TheItemType >::prependList const NCollection_ListNode pCur,
Iterator theIter
[inline, private]
 

template<class TheItemType>
void NCollection_List< TheItemType >::Remove Iterator theIter  )  [inline]
 

template<class TheItemType>
void NCollection_List< TheItemType >::RemoveFirst void   )  [inline]
 

template<class TheItemType>
void NCollection_List< TheItemType >::Reverse  )  [inline]
 

template<class TheItemType>
virtual Standard_Integer NCollection_List< TheItemType >::Size void   )  const [inline, virtual]
 

Implements NCollection_BaseCollection< TheItemType >.


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 13:12:57 2008 for OpenCASCADE by  doxygen 1.4.1