Open CASCADE Technology  7.3.1.dev
Data Structures | Public Types | Public Member Functions | Static Public Member Functions
NCollection_Sequence< TheItemType > Class Template Reference

#include <ApproxInt_KnotTools.hxx>

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

Data Structures

class  Iterator
 Implementation of the Iterator interface. More...
 
class  Node
 Class defining sequence node - for internal use by Sequence. More...
 

Public Types

typedef TheItemType value_type
 STL-compliant typedef for value type. More...
 
typedef NCollection_StlIterator< std::bidirectional_iterator_tag, Iterator, TheItemType, false > iterator
 Shorthand for a regular iterator type. More...
 
typedef NCollection_StlIterator< std::bidirectional_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 sequence. More...
 
iterator end () const
 Returns an iterator referring to the past-the-end element in the sequence. More...
 
const_iterator cbegin () const
 Returns a const iterator pointing to the first element in the sequence. More...
 
const_iterator cend () const
 Returns a const iterator referring to the past-the-end element in the sequence. More...
 
 NCollection_Sequence ()
 Empty constructor. More...
 
 NCollection_Sequence (const Handle< NCollection_BaseAllocator > &theAllocator)
 Constructor. More...
 
 NCollection_Sequence (const NCollection_Sequence &theOther)
 Copy constructor. More...
 
Standard_Integer Size (void) const
 Number of items. More...
 
Standard_Integer Length (void) const
 Number of items. More...
 
Standard_Integer Lower () const
 Method for consistency with other collections. More...
 
Standard_Integer Upper () const
 Method for consistency with other collections. More...
 
Standard_Boolean IsEmpty (void) const
 Empty query. More...
 
void Reverse (void)
 Reverse sequence. More...
 
void Exchange (const Standard_Integer I, const Standard_Integer J)
 Exchange two members. More...
 
void Clear (const Handle< NCollection_BaseAllocator > &theAllocator=0L)
 Clear the items out, take a new allocator if non null. More...
 
NCollection_SequenceAssign (const NCollection_Sequence &theOther)
 Replace this sequence by the items of theOther. This method does not change the internal allocator. More...
 
NCollection_Sequenceoperator= (const NCollection_Sequence &theOther)
 Replacement operator. More...
 
void Remove (Iterator &thePosition)
 Remove one item. More...
 
void Remove (const Standard_Integer theIndex)
 Remove one item. More...
 
void Remove (const Standard_Integer theFromIndex, const Standard_Integer theToIndex)
 Remove range of items. More...
 
void Append (const TheItemType &theItem)
 Append one item. More...
 
void Append (NCollection_Sequence &theSeq)
 Append another sequence (making it empty) More...
 
void Prepend (const TheItemType &theItem)
 Prepend one item. More...
 
void Prepend (NCollection_Sequence &theSeq)
 Prepend another sequence (making it empty) More...
 
void InsertBefore (const Standard_Integer theIndex, const TheItemType &theItem)
 InsertBefore theIndex theItem. More...
 
void InsertBefore (const Standard_Integer theIndex, NCollection_Sequence &theSeq)
 InsertBefore theIndex another sequence (making it empty) More...
 
void InsertAfter (Iterator &thePosition, const TheItemType &theItem)
 InsertAfter the position of iterator. More...
 
void InsertAfter (const Standard_Integer theIndex, NCollection_Sequence &theSeq)
 InsertAfter theIndex another sequence (making it empty) More...
 
void InsertAfter (const Standard_Integer theIndex, const TheItemType &theItem)
 InsertAfter theIndex theItem. More...
 
void Split (const Standard_Integer theIndex, NCollection_Sequence &theSeq)
 Split in two sequences. More...
 
const TheItemType & First () const
 First item access. More...
 
TheItemType & ChangeFirst ()
 First item access. More...
 
const TheItemType & Last () const
 Last item access. More...
 
TheItemType & ChangeLast ()
 Last item access. More...
 
const TheItemType & Value (const Standard_Integer theIndex) const
 Constant item access by theIndex. More...
 
const TheItemType & operator() (const Standard_Integer theIndex) const
 Constant operator() More...
 
TheItemType & ChangeValue (const Standard_Integer theIndex)
 Variable item access by theIndex. More...
 
TheItemType & operator() (const Standard_Integer theIndex)
 Variable operator() More...
 
void SetValue (const Standard_Integer theIndex, const TheItemType &theItem)
 Set item value by theIndex. More...
 
virtual ~NCollection_Sequence (void)
 
- Public Member Functions inherited from NCollection_BaseSequence
Standard_Boolean IsEmpty () const
 
Standard_Integer Length () const
 
const Handle< NCollection_BaseAllocator > & Allocator () const
 Returns attached allocator. More...
 

Static Public Member Functions

static void delNode (NCollection_SeqNode *theNode, Handle< NCollection_BaseAllocator > &theAl)
 Static deleter to be passed to BaseSequence. More...
 

Additional Inherited Members

- Protected Member Functions inherited from NCollection_BaseSequence
 NCollection_BaseSequence (const Handle< NCollection_BaseAllocator > &theAllocator)
 
virtual ~NCollection_BaseSequence ()
 Destructor. More...
 
void ClearSeq (NCollection_DelSeqNode fDel)
 
void PAppend (NCollection_SeqNode *)
 
void PAppend (NCollection_BaseSequence &S)
 
void PPrepend (NCollection_SeqNode *)
 
void PPrepend (NCollection_BaseSequence &S)
 
void PInsertAfter (Iterator &thePosition, NCollection_SeqNode *)
 
void PInsertAfter (const Standard_Integer Index, NCollection_SeqNode *)
 
void PInsertAfter (const Standard_Integer Index, NCollection_BaseSequence &S)
 
void PSplit (const Standard_Integer Index, NCollection_BaseSequence &Sub)
 
void RemoveSeq (Iterator &thePosition, NCollection_DelSeqNode fDel)
 
void RemoveSeq (const Standard_Integer Index, NCollection_DelSeqNode fDel)
 
void RemoveSeq (const Standard_Integer From, const Standard_Integer To, NCollection_DelSeqNode fDel)
 
void PReverse ()
 
void PExchange (const Standard_Integer I, const Standard_Integer J)
 
NCollection_SeqNodeFind (const Standard_Integer) const
 
- Protected Attributes inherited from NCollection_BaseSequence
Handle< NCollection_BaseAllocatormyAllocator
 
NCollection_SeqNodemyFirstItem
 
NCollection_SeqNodemyLastItem
 
NCollection_SeqNodemyCurrentItem
 
Standard_Integer myCurrentIndex
 
Standard_Integer mySize
 

Detailed Description

template<class TheItemType>
class NCollection_Sequence< TheItemType >

Purpose: Definition of a sequence of elements indexed by an Integer in range of 1..n

Member Typedef Documentation

◆ const_iterator

template<class TheItemType>
typedef NCollection_StlIterator<std::bidirectional_iterator_tag, Iterator, TheItemType, true> NCollection_Sequence< TheItemType >::const_iterator

Shorthand for a constant iterator type.

◆ iterator

template<class TheItemType>
typedef NCollection_StlIterator<std::bidirectional_iterator_tag, Iterator, TheItemType, false> NCollection_Sequence< TheItemType >::iterator

Shorthand for a regular iterator type.

◆ value_type

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

STL-compliant typedef for value type.

Constructor & Destructor Documentation

◆ NCollection_Sequence() [1/3]

template<class TheItemType>
NCollection_Sequence< TheItemType >::NCollection_Sequence ( )
inline

Empty constructor.

◆ NCollection_Sequence() [2/3]

template<class TheItemType>
NCollection_Sequence< TheItemType >::NCollection_Sequence ( const Handle< NCollection_BaseAllocator > &  theAllocator)
inlineexplicit

Constructor.

◆ NCollection_Sequence() [3/3]

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

Copy constructor.

◆ ~NCollection_Sequence()

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

Member Function Documentation

◆ Append() [1/2]

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

Append one item.

◆ Append() [2/2]

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Append ( NCollection_Sequence< TheItemType > &  theSeq)
inline

Append another sequence (making it empty)

◆ Assign()

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

Replace this sequence by the items of theOther. This method does not change the internal allocator.

◆ begin()

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

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

◆ cbegin()

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

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

◆ cend()

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

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

◆ ChangeFirst()

template<class TheItemType>
TheItemType& NCollection_Sequence< TheItemType >::ChangeFirst ( )
inline

First item access.

◆ ChangeLast()

template<class TheItemType>
TheItemType& NCollection_Sequence< TheItemType >::ChangeLast ( )
inline

Last item access.

◆ ChangeValue()

template<class TheItemType>
TheItemType& NCollection_Sequence< TheItemType >::ChangeValue ( const Standard_Integer  theIndex)
inline

Variable item access by theIndex.

◆ Clear()

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

Clear the items out, take a new allocator if non null.

◆ delNode()

template<class TheItemType>
static void NCollection_Sequence< TheItemType >::delNode ( NCollection_SeqNode theNode,
Handle< NCollection_BaseAllocator > &  theAl 
)
inlinestatic

Static deleter to be passed to BaseSequence.

◆ end()

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

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

◆ Exchange()

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Exchange ( const Standard_Integer  I,
const Standard_Integer  J 
)
inline

Exchange two members.

◆ First()

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

First item access.

◆ InsertAfter() [1/3]

template<class TheItemType>
void NCollection_Sequence< TheItemType >::InsertAfter ( Iterator thePosition,
const TheItemType &  theItem 
)
inline

InsertAfter the position of iterator.

◆ InsertAfter() [2/3]

template<class TheItemType>
void NCollection_Sequence< TheItemType >::InsertAfter ( const Standard_Integer  theIndex,
NCollection_Sequence< TheItemType > &  theSeq 
)
inline

InsertAfter theIndex another sequence (making it empty)

◆ InsertAfter() [3/3]

template<class TheItemType>
void NCollection_Sequence< TheItemType >::InsertAfter ( const Standard_Integer  theIndex,
const TheItemType &  theItem 
)
inline

InsertAfter theIndex theItem.

◆ InsertBefore() [1/2]

template<class TheItemType>
void NCollection_Sequence< TheItemType >::InsertBefore ( const Standard_Integer  theIndex,
const TheItemType &  theItem 
)
inline

InsertBefore theIndex theItem.

◆ InsertBefore() [2/2]

template<class TheItemType>
void NCollection_Sequence< TheItemType >::InsertBefore ( const Standard_Integer  theIndex,
NCollection_Sequence< TheItemType > &  theSeq 
)
inline

InsertBefore theIndex another sequence (making it empty)

◆ IsEmpty()

template<class TheItemType>
Standard_Boolean NCollection_Sequence< TheItemType >::IsEmpty ( void  ) const
inline

Empty query.

◆ Last()

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

Last item access.

◆ Length()

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

Number of items.

◆ Lower()

template<class TheItemType>
Standard_Integer NCollection_Sequence< TheItemType >::Lower ( void  ) const
inline

Method for consistency with other collections.

Returns
Lower bound (inclusive) for iteration.

◆ operator()() [1/2]

template<class TheItemType>
const TheItemType& NCollection_Sequence< TheItemType >::operator() ( const Standard_Integer  theIndex) const
inline

Constant operator()

◆ operator()() [2/2]

template<class TheItemType>
TheItemType& NCollection_Sequence< TheItemType >::operator() ( const Standard_Integer  theIndex)
inline

Variable operator()

◆ operator=()

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

Replacement operator.

◆ Prepend() [1/2]

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

Prepend one item.

◆ Prepend() [2/2]

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Prepend ( NCollection_Sequence< TheItemType > &  theSeq)
inline

Prepend another sequence (making it empty)

◆ Remove() [1/3]

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Remove ( Iterator thePosition)
inline

Remove one item.

◆ Remove() [2/3]

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Remove ( const Standard_Integer  theIndex)
inline

Remove one item.

◆ Remove() [3/3]

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Remove ( const Standard_Integer  theFromIndex,
const Standard_Integer  theToIndex 
)
inline

Remove range of items.

◆ Reverse()

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

Reverse sequence.

◆ SetValue()

template<class TheItemType>
void NCollection_Sequence< TheItemType >::SetValue ( const Standard_Integer  theIndex,
const TheItemType &  theItem 
)
inline

Set item value by theIndex.

◆ Size()

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

Number of items.

◆ Split()

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Split ( const Standard_Integer  theIndex,
NCollection_Sequence< TheItemType > &  theSeq 
)
inline

Split in two sequences.

◆ Upper()

template<class TheItemType>
Standard_Integer NCollection_Sequence< TheItemType >::Upper ( void  ) const
inline

Method for consistency with other collections.

Returns
Upper bound (inclusive) for iteration.

◆ Value()

template<class TheItemType>
const TheItemType& NCollection_Sequence< TheItemType >::Value ( const Standard_Integer  theIndex) const
inline

Constant item access by theIndex.


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