Open CASCADE Technology  7.2.0
Public Types | Public Member Functions

NCollection_List< TheItemType > Class Template Reference

#include <ApproxInt_KnotTools.hxx>

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

Public Types

typedef TheItemType value_type
 STL-compliant typedef for value type. More...
 
typedef NCollection_TListNode< TheItemType > ListNode
 
typedef NCollection_TListIterator< TheItemType > Iterator
 
typedef NCollection_StlIterator< std::forward_iterator_tag, Iterator, TheItemType, false > iterator
 Shorthand for a regular iterator type. More...
 
typedef NCollection_StlIterator< std::forward_iterator_tag, Iterator, TheItemType, true > const_iterator
 Shorthand for a constant iterator type. More...
 

Public Member Functions

iterator begin () const
 Returns an iterator pointing to the first element in the list. More...
 
iterator end () const
 Returns an iterator referring to the past-the-end element in the list. More...
 
const_iterator cbegin () const
 Returns a const iterator pointing to the first element in the list. More...
 
const_iterator cend () const
 Returns a const iterator referring to the past-the-end element in the list. More...
 
 NCollection_List (const Handle< NCollection_BaseAllocator > &theAllocator=0L)
 Constructor. More...
 
 NCollection_List (const NCollection_List &theOther)
 Copy constructor. More...
 
Standard_Integer Size (void) const
 Size - Number of items. More...
 
NCollection_ListAssign (const NCollection_List &theOther)
 Replace this list by the items of another list (theOther parameter). This method does not change the internal allocator. More...
 
NCollection_Listoperator= (const NCollection_List &theOther)
 Replacement operator. More...
 
void Clear (const Handle< NCollection_BaseAllocator > &theAllocator=0L)
 Clear this list. More...
 
const TheItemType & First (void) const
 First item. More...
 
TheItemType & First (void)
 First item (non-const) More...
 
const TheItemType & Last (void) const
 Last item. More...
 
TheItemType & Last (void)
 Last item (non-const) More...
 
TheItemType & Append (const TheItemType &theItem)
 Append one item at the end. More...
 
void Append (const TheItemType &theItem, Iterator &theIter)
 Append one item at the end and output iterator pointing at the appended item. More...
 
void Append (NCollection_List &theOther)
 Append another list at the end. More...
 
TheItemType & Prepend (const TheItemType &theItem)
 Prepend one item at the beginning. More...
 
void Prepend (NCollection_List &theOther)
 Prepend another list at the beginning. More...
 
void RemoveFirst (void)
 RemoveFirst item. More...
 
void Remove (Iterator &theIter)
 Remove item pointed by iterator theIter; theIter is then set to the next item. More...
 
template<typename TheValueType >
Standard_Boolean Remove (const TheValueType &theObject)
 Remove the first occurrence of the object. More...
 
TheItemType & InsertBefore (const TheItemType &theItem, Iterator &theIter)
 InsertBefore. More...
 
void InsertBefore (NCollection_List &theOther, Iterator &theIter)
 InsertBefore. More...
 
TheItemType & InsertAfter (const TheItemType &theItem, Iterator &theIter)
 InsertAfter. More...
 
void InsertAfter (NCollection_List &theOther, Iterator &theIter)
 InsertAfter. More...
 
void Reverse ()
 Reverse the list. More...
 
template<typename TheValueType >
Standard_Boolean Contains (const TheValueType &theObject) const
 Return true if object is stored in the list. More...
 
virtual ~NCollection_List (void)
 Destructor - clears the List. More...
 
- Public Member Functions inherited from NCollection_BaseList
Standard_Integer Extent (void) const
 
Standard_Boolean IsEmpty (void) const
 
const Handle< NCollection_BaseAllocator > & Allocator () const
 Returns attached allocator. More...
 
virtual ~NCollection_BaseList (void)
 

Additional Inherited Members

- Protected Member Functions inherited from NCollection_BaseList
 NCollection_BaseList (const Handle< NCollection_BaseAllocator > &theAllocator=0L)
 
void PClear (NCollection_DelListNode fDel)
 
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)
 
void PRemove (Iterator &theIter, NCollection_DelListNode fDel)
 
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_BaseList
Handle< NCollection_BaseAllocatormyAllocator
 
NCollection_ListNodemyFirst
 
NCollection_ListNodemyLast
 
Standard_Integer myLength
 

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

◆ const_iterator

template<class TheItemType>
typedef NCollection_StlIterator<std::forward_iterator_tag, Iterator, TheItemType, true> NCollection_List< TheItemType >::const_iterator

Shorthand for a constant iterator type.

◆ Iterator

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

◆ iterator

template<class TheItemType>
typedef NCollection_StlIterator<std::forward_iterator_tag, Iterator, TheItemType, false> NCollection_List< TheItemType >::iterator

Shorthand for a regular iterator type.

◆ ListNode

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

◆ value_type

template<class TheItemType>
typedef TheItemType NCollection_List< TheItemType >::value_type

STL-compliant typedef for value type.

Constructor & Destructor Documentation

◆ NCollection_List() [1/2]

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

Constructor.

◆ NCollection_List() [2/2]

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

Copy constructor.

◆ ~NCollection_List()

template<class TheItemType>
virtual NCollection_List< TheItemType >::~NCollection_List ( void  )
inlinevirtual

Destructor - clears the List.

Member Function Documentation

◆ Append() [1/3]

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

Append one item at the end.

◆ Append() [2/3]

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

Append one item at the end and output iterator pointing at the appended item.

◆ Append() [3/3]

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

Append another list at the end.

◆ Assign()

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

Replace this list by the items of another list (theOther parameter). This method does not change the internal allocator.

◆ begin()

template<class TheItemType>
iterator NCollection_List< TheItemType >::begin ( ) const
inline

Returns an iterator pointing to the first element in the list.

◆ cbegin()

template<class TheItemType>
const_iterator NCollection_List< TheItemType >::cbegin ( ) const
inline

Returns a const iterator pointing to the first element in the list.

◆ cend()

template<class TheItemType>
const_iterator NCollection_List< TheItemType >::cend ( ) const
inline

Returns a const iterator referring to the past-the-end element in the list.

◆ Clear()

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

Clear this list.

◆ Contains()

template<class TheItemType>
template<typename TheValueType >
Standard_Boolean NCollection_List< TheItemType >::Contains ( const TheValueType &  theObject) const
inline

Return true if object is stored in the list.

◆ end()

template<class TheItemType>
iterator NCollection_List< TheItemType >::end ( ) const
inline

Returns an iterator referring to the past-the-end element in the list.

◆ First() [1/2]

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

First item.

◆ First() [2/2]

template<class TheItemType>
TheItemType& NCollection_List< TheItemType >::First ( void  )
inline

First item (non-const)

◆ InsertAfter() [1/2]

template<class TheItemType>
TheItemType& NCollection_List< TheItemType >::InsertAfter ( const TheItemType &  theItem,
Iterator theIter 
)
inline

InsertAfter.

◆ InsertAfter() [2/2]

template<class TheItemType>
void NCollection_List< TheItemType >::InsertAfter ( NCollection_List< TheItemType > &  theOther,
Iterator theIter 
)
inline

InsertAfter.

◆ InsertBefore() [1/2]

template<class TheItemType>
TheItemType& NCollection_List< TheItemType >::InsertBefore ( const TheItemType &  theItem,
Iterator theIter 
)
inline

InsertBefore.

◆ InsertBefore() [2/2]

template<class TheItemType>
void NCollection_List< TheItemType >::InsertBefore ( NCollection_List< TheItemType > &  theOther,
Iterator theIter 
)
inline

InsertBefore.

◆ Last() [1/2]

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

Last item.

◆ Last() [2/2]

template<class TheItemType>
TheItemType& NCollection_List< TheItemType >::Last ( void  )
inline

Last item (non-const)

◆ operator=()

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

Replacement operator.

◆ Prepend() [1/2]

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

Prepend one item at the beginning.

◆ Prepend() [2/2]

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

Prepend another list at the beginning.

◆ Remove() [1/2]

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

Remove item pointed by iterator theIter; theIter is then set to the next item.

◆ Remove() [2/2]

template<class TheItemType>
template<typename TheValueType >
Standard_Boolean NCollection_List< TheItemType >::Remove ( const TheValueType &  theObject)
inline

Remove the first occurrence of the object.

◆ RemoveFirst()

template<class TheItemType>
void NCollection_List< TheItemType >::RemoveFirst ( void  )
inline

RemoveFirst item.

◆ Reverse()

template<class TheItemType>
void NCollection_List< TheItemType >::Reverse ( )
inline

Reverse the list.

◆ Size()

template<class TheItemType>
Standard_Integer NCollection_List< TheItemType >::Size ( void  ) const
inline

Size - Number of items.


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