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

#include <NCollection_Sequence.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.
 
typedef NCollection_StlIterator< std::bidirectional_iterator_tag, Iterator, TheItemType, falseiterator
 Shorthand for a regular iterator type.
 
typedef NCollection_StlIterator< std::bidirectional_iterator_tag, Iterator, TheItemType, trueconst_iterator
 Shorthand for a constant iterator type.
 

Public Member Functions

iterator begin () const
 Returns an iterator pointing to the first element in the sequence.
 
iterator end () const
 Returns an iterator referring to the past-the-end element in the sequence.
 
const_iterator cbegin () const
 Returns a const iterator pointing to the first element in the sequence.
 
const_iterator cend () const
 Returns a const iterator referring to the past-the-end element in the sequence.
 
 NCollection_Sequence ()
 Empty constructor.
 
 NCollection_Sequence (const Handle< NCollection_BaseAllocator > &theAllocator)
 Constructor.
 
 NCollection_Sequence (const NCollection_Sequence &theOther)
 Copy constructor.
 
 NCollection_Sequence (NCollection_Sequence &&theOther) noexcept
 Move constructor.
 
Standard_Integer Size (void) const
 Number of items.
 
Standard_Integer Length (void) const
 Number of items.
 
Standard_Integer Lower () const
 Method for consistency with other collections.
 
Standard_Integer Upper () const
 Method for consistency with other collections.
 
Standard_Boolean IsEmpty (void) const
 Empty query.
 
void Reverse (void)
 Reverse sequence.
 
void Exchange (const Standard_Integer I, const Standard_Integer J)
 Exchange two members.
 
void Clear (const Handle< NCollection_BaseAllocator > &theAllocator=0L)
 Clear the items out, take a new allocator if non null.
 
NCollection_SequenceAssign (const NCollection_Sequence &theOther)
 Replace this sequence by the items of theOther. This method does not change the internal allocator.
 
NCollection_Sequenceoperator= (const NCollection_Sequence &theOther)
 Replacement operator.
 
NCollection_Sequenceoperator= (NCollection_Sequence &&theOther) noexcept
 Move operator.
 
void Remove (Iterator &thePosition)
 Remove one item.
 
void Remove (const Standard_Integer theIndex)
 Remove one item.
 
void Remove (const Standard_Integer theFromIndex, const Standard_Integer theToIndex)
 Remove range of items.
 
void Append (const TheItemType &theItem)
 Append one item.
 
void Append (TheItemType &&theItem)
 Append one item.
 
void Append (NCollection_Sequence &theSeq)
 Append another sequence (making it empty)
 
void Prepend (const TheItemType &theItem)
 Prepend one item.
 
void Prepend (TheItemType &&theItem)
 Prepend one item.
 
void Prepend (NCollection_Sequence &theSeq)
 Prepend another sequence (making it empty)
 
void InsertBefore (const Standard_Integer theIndex, const TheItemType &theItem)
 InsertBefore theIndex theItem.
 
void InsertBefore (const Standard_Integer theIndex, TheItemType &&theItem)
 InsertBefore theIndex theItem.
 
void InsertBefore (const Standard_Integer theIndex, NCollection_Sequence &theSeq)
 InsertBefore theIndex another sequence (making it empty)
 
void InsertAfter (Iterator &thePosition, const TheItemType &theItem)
 InsertAfter the position of iterator.
 
void InsertAfter (Iterator &thePosition, TheItemType &&theItem)
 InsertAfter the position of iterator.
 
void InsertAfter (const Standard_Integer theIndex, NCollection_Sequence &theSeq)
 InsertAfter theIndex another sequence (making it empty)
 
void InsertAfter (const Standard_Integer theIndex, const TheItemType &theItem)
 InsertAfter theIndex theItem.
 
void InsertAfter (const Standard_Integer theIndex, TheItemType &&theItem)
 InsertAfter theIndex theItem.
 
void Split (const Standard_Integer theIndex, NCollection_Sequence &theSeq)
 Split in two sequences.
 
const TheItemTypeFirst () const
 First item access.
 
TheItemTypeChangeFirst ()
 First item access.
 
const TheItemTypeLast () const
 Last item access.
 
TheItemTypeChangeLast ()
 Last item access.
 
const TheItemTypeValue (const Standard_Integer theIndex) const
 Constant item access by theIndex.
 
const TheItemTypeoperator() (const Standard_Integer theIndex) const
 Constant operator()
 
TheItemTypeChangeValue (const Standard_Integer theIndex)
 Variable item access by theIndex.
 
TheItemTypeoperator() (const Standard_Integer theIndex)
 Variable operator()
 
void SetValue (const Standard_Integer theIndex, const TheItemType &theItem)
 Set item value by theIndex.
 
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.
 

Static Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from NCollection_BaseSequence
 NCollection_BaseSequence (const Handle< NCollection_BaseAllocator > &theAllocator)
 
virtual ~NCollection_BaseSequence ()
 Destructor.
 
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

STL-compliant typedef for value type.

Constructor & Destructor Documentation

◆ NCollection_Sequence() [1/4]

Empty constructor.

◆ NCollection_Sequence() [2/4]

Constructor.

◆ NCollection_Sequence() [3/4]

Copy constructor.

◆ NCollection_Sequence() [4/4]

Move constructor.

◆ ~NCollection_Sequence()

Member Function Documentation

◆ Append() [1/3]

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

Append one item.

◆ Append() [2/3]

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

Append another sequence (making it empty)

◆ Append() [3/3]

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

Append one item.

◆ Assign()

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/5]

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

InsertAfter theIndex theItem.

◆ InsertAfter() [2/5]

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/5]

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

InsertAfter theIndex theItem.

◆ InsertAfter() [4/5]

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

InsertAfter the position of iterator.

◆ InsertAfter() [5/5]

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

InsertAfter the position of iterator.

◆ InsertBefore() [1/3]

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

InsertBefore theIndex theItem.

◆ InsertBefore() [2/3]

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

InsertBefore theIndex another sequence (making it empty)

◆ InsertBefore() [3/3]

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

InsertBefore theIndex theItem.

◆ 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 ( ) const
inline

Method for consistency with other collections.

Returns
Lower bound (inclusive) for iteration.

◆ operator()() [1/2]

Variable operator()

◆ operator()() [2/2]

Constant operator()

◆ operator=() [1/2]

Replacement operator.

◆ operator=() [2/2]

Move operator.

◆ Prepend() [1/3]

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

Prepend one item.

◆ Prepend() [2/3]

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

Prepend another sequence (making it empty)

◆ Prepend() [3/3]

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

Prepend one item.

◆ Remove() [1/3]

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

Remove range of items.

◆ 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 ( Iterator thePosition)
inline

Remove one item.

◆ 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 ( ) 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: