# FoundationClasses
TKernel
NCollection

# FoundationClasses
TKernel
NCollection

# NCollection_Sequence< TheItemType > Class Template Reference

`#include <NCollection_Sequence.hxx>`

Inheritance diagram for NCollection_Sequence< TheItemType >:

[legend]

## Public Member Functions

| NCollection_Sequence (const Handle(NCollection_BaseAllocator)&theAllocator=0L)
| Constructor.
| NCollection_Sequence (const NCollection_Sequence &theOther)
| Copy constructor.
virtual Standard_Integer | Size (void) const
| Number of items.
Standard_Integer | Length (void) const
| Number of items.
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_Sequence & | operator= (const NCollection_Sequence &theOther)
| Replace this sequence by the items of theOther.
virtual void | Assign (const NCollection_BaseCollection< TheItemType > &theOther)
| Replace this sequence by the items of theOther collection.
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 (NCollection_Sequence &theSeq)
| Append another sequence (making it empty).
void | Prepend (const 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, NCollection_Sequence &theSeq)
| InsertBefore theIndex another sequence.
void | InsertAfter (Iterator &thePosition, const TheItemType &theItem)
| InsertAfter the position of iterator.
void | InsertAfter (const Standard_Integer theIndex, NCollection_Sequence &theSeq)
| InsertAfter theIndex theItem.
void | InsertAfter (const Standard_Integer theIndex, const TheItemType &theItem)
| InsertAfter theIndex another sequence.
void | Split (const Standard_Integer theIndex, NCollection_Sequence &theSeq)
| Split in two sequences.
const TheItemType & | First () const
| First item access.
const TheItemType & | Last () const
| Last item access.
const TheItemType & | Value (const Standard_Integer theIndex) const
| Constant item access by theIndex.
const TheItemType & | operator() (const Standard_Integer theIndex) const
| Constant operator().
TheItemType & | ChangeValue (const Standard_Integer theIndex)
| Variable item access by theIndex.
TheItemType & | operator() (const Standard_Integer theIndex)
| Variable operator().
void | SetValue (const Standard_Integer theIndex, const TheItemType &theItem)
| Set item value by theIndex.
| ~NCollection_Sequence (void)

## Static Public Member Functions

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

## Private Member Functions

virtual TYPENAME NCollection_BaseCollection< TheItemType >::Iterator & | CreateIterator (void) const
| Creates Iterator for use on BaseCollection.

## Data Structures

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

## 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 Handle(NCollection_BaseAllocator)& | theAllocator = `0L` | ) | `[inline]`

template<class TheItemType>
NCollection_Sequence< TheItemType >::NCollection_Sequence | ( | const NCollection_Sequence< TheItemType > & | theOther | ) | `[inline]`

template<class TheItemType>
NCollection_Sequence< TheItemType >::~NCollection_Sequence | ( | void |  | ) | `[inline]`

## Member Function Documentation

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Append | ( | NCollection_Sequence< TheItemType > & | theSeq | ) | `[inline]`

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Append | ( | const TheItemType & | theItem | ) | `[inline]`

template<class TheItemType>
virtual void NCollection_Sequence< TheItemType >::Assign | ( | const NCollection_BaseCollection< TheItemType > & | theOther | ) | `[inline, virtual]`

template<class TheItemType>
TheItemType& NCollection_Sequence< TheItemType >::ChangeValue | ( | const Standard_Integer | theIndex | ) | `[inline]`

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

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

| Implements NCollection_BaseCollection< TheItemType >.

template<class TheItemType>
static void NCollection_Sequence< TheItemType >::delNode | ( | NCollection_SeqNode * | theNode,
|  | Handle(NCollection_BaseAllocator)& | theAl
| ) | `[inline, static]`

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

template<class TheItemType>
const TheItemType& NCollection_Sequence< TheItemType >::First | ( |  | ) | const`[inline]`

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

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

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

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

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

template<class TheItemType>
Standard_Boolean NCollection_Sequence< TheItemType >::IsEmpty | ( | void |  | ) | const`[inline]`

| Reimplemented from NCollection_BaseSequence.

template<class TheItemType>
const TheItemType& NCollection_Sequence< TheItemType >::Last | ( |  | ) | const`[inline]`

template<class TheItemType>
Standard_Integer NCollection_Sequence< TheItemType >::Length | ( | void |  | ) | const`[inline]`

| Reimplemented from NCollection_BaseSequence.

template<class TheItemType>
TheItemType& NCollection_Sequence< TheItemType >::operator() | ( | const Standard_Integer | theIndex | ) | `[inline]`

template<class TheItemType>
const TheItemType& NCollection_Sequence< TheItemType >::operator() | ( | const Standard_Integer | theIndex | ) | const`[inline]`

template<class TheItemType>
NCollection_Sequence& NCollection_Sequence< TheItemType >::operator= | ( | const NCollection_Sequence< TheItemType > & | theOther | ) | `[inline]`

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Prepend | ( | NCollection_Sequence< TheItemType > & | theSeq | ) | `[inline]`

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Prepend | ( | const TheItemType & | theItem | ) | `[inline]`

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

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Remove | ( | const Standard_Integer | theIndex | ) | `[inline]`

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Remove | ( | Iterator & | thePosition | ) | `[inline]`

template<class TheItemType>
void NCollection_Sequence< TheItemType >::Reverse | ( | void |  | ) | `[inline]`

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

template<class TheItemType>
virtual Standard_Integer NCollection_Sequence< TheItemType >::Size | ( | void |  | ) | const`[inline, virtual]`

| Implements NCollection_BaseCollection< TheItemType >.

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

template<class TheItemType>
const TheItemType& NCollection_Sequence< TheItemType >::Value | ( | const Standard_Integer | theIndex | ) | const`[inline]`

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

- NCollection_Sequence.hxx