Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Data Structures | Public Member Functions | Static Public Member Functions | Data Fields
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 Member Functions

 NCollection_BaseSequence ()
 
 NCollection_Sequence (const NCollection_Sequence &theOther)
 Copy constructor. More...
 
virtual 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_Sequenceoperator= (const NCollection_Sequence &theOther)
 Replace this sequence by the items of theOther. More...
 
virtual void Assign (const NCollection_BaseCollection< TheItemType > &theOther)
 Replace this sequence by the items of theOther collection. 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. 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 theItem. More...
 
void InsertAfter (const Standard_Integer theIndex, const TheItemType &theItem)
 InsertAfter theIndex another sequence. 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...
 
 ~NCollection_Sequence (void)
 
- 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_BaseSequence
Standard_Boolean IsEmpty () const
 
Standard_Integer Length () const
 

Static Public Member Functions

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

Data Fields

 __pad0__: NCollection_BaseCollection<TheItemType>(theAllocator)
 Constructor. More...
 

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_BaseSequence
 NCollection_BaseSequence ()
 
void ClearSeq (NCollection_DelSeqNode fDel, Handle< NCollection_BaseAllocator > &theAl)
 
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, Handle< NCollection_BaseAllocator > &theAl)
 
void RemoveSeq (const Standard_Integer Index, NCollection_DelSeqNode fDel, Handle< NCollection_BaseAllocator > &theAl)
 
void RemoveSeq (const Standard_Integer From, const Standard_Integer To, NCollection_DelSeqNode fDel, Handle< NCollection_BaseAllocator > &theAl)
 
void PReverse ()
 
void PExchange (const Standard_Integer I, const Standard_Integer J)
 
const NCollection_SeqNodeFind (const Standard_Integer) const
 
- Protected Attributes inherited from NCollection_BaseCollection< TheItemType >
Handle< NCollection_BaseAllocatormyAllocator
 
- Protected Attributes inherited from NCollection_BaseSequence
const NCollection_SeqNodemyFirstItem
 
const NCollection_SeqNodemyLastItem
 
const 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

Constructor & Destructor Documentation

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

Copy constructor.

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

Member Function Documentation

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

Append one item.

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

Append another sequence (making it empty)

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

Replace this sequence by the items of theOther collection.

Implements NCollection_BaseCollection< TheItemType >.

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

First item access.

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

Last item access.

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

Variable item access by theIndex.

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.

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

Static deleter to be passed to BaseSequence.

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

Exchange two members.

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

First item access.

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

InsertAfter the position of iterator.

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

InsertAfter theIndex theItem.

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

InsertAfter theIndex another sequence.

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

InsertBefore theIndex theItem.

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

InsertBefore theIndex another sequence.

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

Empty query.

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

Last item access.

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

Number of items.

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

Method for consistency with other collections.

Returns
Lower bound (inclusive) for iteration.
template<class TheItemType>
NCollection_Sequence< TheItemType >::NCollection_BaseSequence ( )
inline
template<class TheItemType>
const TheItemType& NCollection_Sequence< TheItemType >::operator() ( const Standard_Integer  theIndex) const
inline

Constant operator()

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

Variable operator()

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

Replace this sequence by the items of theOther.

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

Prepend one item.

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

Prepend another sequence (making it empty)

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

Remove one item.

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

Remove one item.

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

Remove range of items.

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

Reverse sequence.

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

Set item value by theIndex.

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

Number of items.

Implements NCollection_BaseCollection< TheItemType >.

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

Split in two sequences.

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

Method for consistency with other collections.

Returns
Upper bound (inclusive) for iteration.
template<class TheItemType>
const TheItemType& NCollection_Sequence< TheItemType >::Value ( const Standard_Integer  theIndex) const
inline

Constant item access by theIndex.

Field Documentation

template<class TheItemType>
NCollection_Sequence< TheItemType >::__pad0__

Constructor.


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