Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

vtkSequenceContainer Class Reference

#include <vtkSequenceContainer.h>

Inheritance diagram for vtkSequenceContainer:

Inheritance graph
[legend]
Collaboration diagram for vtkSequenceContainer:

Collaboration graph
[legend]
List of all members.

Detailed Description

Abstract sequence container for objects.

A Sequence is a variable-sized Container whose items are arranged in a strict linear order. It supports insertion and removal of items.

Warning:
There is no guarantee that a valid iterator on a is still valid after an insertion or an erasure. In some cases iterators do remain valid, and in other cases they do not. The details are different for each sequence class.
Author:
Sean McInerney
Version:
Revision
1.4
Date:
Date
2005/06/24 23:17:16
See also:
vtkContainer vtkObjectBase

Definition at line 41 of file vtkSequenceContainer.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkSequenceContainer, vtkContainer)
void PrintSelf (ostream &, vtkIndent)
virtual int Swap (vtkSequenceContainer *container)=0
 Swaps items of this container with those of the specified container.

virtual int Copy (vtkSequenceContainer *container)=0
 Copy all items from the specified container into this container.

virtual vtkObjectBaseAt (vtkIdType position) const
 Provides access by index to the objects contained in this sequence.

virtual int Insert (vtkIdType position, vtkObjectBase *item)=0
 Inserts an item into this sequence at the specified position.

virtual int Insert (vtkIdType position, vtkSequenceContainer *sequence)=0
 Inserts copies of all items in the source sequence into this sequence at the specified position.

virtual int Insert (vtkIdType position, vtkSequenceContainer *sequence, vtkIdType seqBeg, vtkIdType seqEnd)=0
 Inserts copies of the range [srcBeg ..

virtual int Assign (vtkIdType position, vtkObjectBase *item)=0
 Assigns item to the specified position replacing the existant item.

virtual int PushFront (vtkObjectBase *item)=0
 Add an item to the front of this sequence.

virtual int PopFront (void)=0
 Removes the first item of this sequence.

virtual int PushBack (vtkObjectBase *item)=0
 Add an item to the end of this sequence.

virtual int PopBack (void)=0
 Removes the last item of the sequence.

virtual int Erase (vtkIdType position)=0
 Remove the item at the given position.

virtual int Erase (vtkIdType pos1, vtkIdType pos2)=0
 Remove the items in the given range [pos1 ..

virtual int Erase (vtkObjectBase *item)=0
 Remove the first occurence of the given item from the sequence.

virtual int Clear (vtkObjectBase *item)=0
 Remove all occurrences of the given item from the sequence.

virtual vtkIdType Find (vtkObjectBase *item) const
 Find the first occurence of an item in the sequence.

virtual int Reverse (void)=0
 Reverse the sequence ordering.

virtual int Reverse (vtkIdType pos1, vtkIdType pos2)=0
 Reverse the sequence ordering in the given range [pos1 ..

virtual int Sort (void)=0
 Sort the sequence items by address with operator <.

virtual int Unique (void)=0
 Removes subsequent duplicates of sequence items so that each item contains a different value than the following item.

virtual int Rotate (vtkIdType index)=0
 Rotates the items in this sequence so that index is the new first element after the call.

virtual int Shuffle (void)=0
 Shuffles the order of the items in this sequence using a uniform distribution random number generator.

virtual vtkSequenceIteratorCreateIterator (void)=0
 Create an iterator.


Protected Member Functions

 vtkSequenceContainer (void)
 ~vtkSequenceContainer ()


Constructor & Destructor Documentation

vtkSequenceContainer::vtkSequenceContainer void   )  [protected]
 

vtkSequenceContainer::~vtkSequenceContainer  )  [protected]
 


Member Function Documentation

virtual int vtkSequenceContainer::Assign vtkIdType  position,
vtkObjectBase item
[pure virtual]
 

Assigns item to the specified position replacing the existant item.

Returns:
true if the item can be set, otherwise false.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual vtkObjectBase* vtkSequenceContainer::At vtkIdType  position  )  const [inline, virtual]
 

Provides access by index to the objects contained in this sequence.

Parameters:
position The item index for which object should be accessed.
Returns:
the item if position is a valid index, otherwise null.

Reimplemented in vtkObjectBaseDeque, vtkObjectBaseList, vtkObjectBaseVector, vtkObjectDeque, vtkObjectList, and vtkObjectVector.

Definition at line 66 of file vtkSequenceContainer.h.

virtual int vtkSequenceContainer::Clear vtkObjectBase item  )  [pure virtual]
 

Remove all occurrences of the given item from the sequence.

Returns:
true if an item was removed, otherwise false.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual int vtkSequenceContainer::Copy vtkSequenceContainer container  )  [pure virtual]
 

Copy all items from the specified container into this container.

Returns:
true on success, otherwise false.

virtual vtkSequenceIterator* vtkSequenceContainer::CreateIterator void   )  [pure virtual]
 

Create an iterator.

Implements vtkContainer.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, vtkObjectBaseVector, vtkObjectDeque, vtkObjectList, and vtkObjectVector.

virtual int vtkSequenceContainer::Erase vtkObjectBase item  )  [pure virtual]
 

Remove the first occurence of the given item from the sequence.

Returns:
true if an item was removed, otherwise false.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual int vtkSequenceContainer::Erase vtkIdType  pos1,
vtkIdType  pos2
[pure virtual]
 

Remove the items in the given range [pos1 ..

pos2] of positions.

Returns:
true if an item was removed, otherwise false.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual int vtkSequenceContainer::Erase vtkIdType  position  )  [pure virtual]
 

Remove the item at the given position.

Returns:
true if an item was removed, otherwise false.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual vtkIdType vtkSequenceContainer::Find vtkObjectBase item  )  const [inline, virtual]
 

Find the first occurence of an item in the sequence.

Returns:
the item index if found, otherwise -1.

Reimplemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

Definition at line 185 of file vtkSequenceContainer.h.

virtual int vtkSequenceContainer::Insert vtkIdType  position,
vtkSequenceContainer sequence,
vtkIdType  seqBeg,
vtkIdType  seqEnd
[pure virtual]
 

Inserts copies of the range [srcBeg ..

srcEnd] in the source sequence into this sequence at the specified position.

Parameters:
position An index into the sequence.
sequence A source sequence to be inserted.
seqBeg The index of the first item to copy.
seqEnd The index of the last item to copy.
Note:
Any items in the sequence at a location greater than or equal to position will be shifted by number of items in the source sequence to make room for the inserted items.
Warning:
For vectors and deques this may invalidate iterators.
Returns:
true on success, false otherwise.

virtual int vtkSequenceContainer::Insert vtkIdType  position,
vtkSequenceContainer sequence
[pure virtual]
 

Inserts copies of all items in the source sequence into this sequence at the specified position.

Parameters:
position An index into the sequence.
sequence A source sequence to be inserted.
Note:
Any items in the sequence at a location greater than or equal to position will be shifted by number of items in the source sequence to make room for the inserted items.
Warning:
For vectors and deques this may invalidate iterators.
Returns:
true on success, false otherwise.

virtual int vtkSequenceContainer::Insert vtkIdType  position,
vtkObjectBase item
[pure virtual]
 

Inserts an item into this sequence at the specified position.

Parameters:
position An index into the sequence.
item Data to be inserted.
Note:
Any items in the sequence at a location greater than or equal to position will be shifted by one position to make room for the inserted item.
Warning:
For vectors and deques this may invalidate iterators.
Returns:
true on success, false otherwise.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual int vtkSequenceContainer::PopBack void   )  [pure virtual]
 

Removes the last item of the sequence.

Note:
No data is returned. If the last item is needed, it should be retrieved before calling PopBack.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual int vtkSequenceContainer::PopFront void   )  [pure virtual]
 

Removes the first item of this sequence.

Note:
No data is returned. If the first item is needed, it should be retrieved before calling PopFront.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

void vtkSequenceContainer::PrintSelf ostream &  ,
vtkIndent 
[virtual]
 

Reimplemented from vtkContainer.

Reimplemented in vtkObjectBaseDeque, vtkObjectBaseList, vtkObjectBaseVector, vtkObjectDeque, vtkObjectList, and vtkObjectVector.

virtual int vtkSequenceContainer::PushBack vtkObjectBase item  )  [pure virtual]
 

Add an item to the end of this sequence.

Parameters:
item the object to be added.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual int vtkSequenceContainer::PushFront vtkObjectBase item  )  [pure virtual]
 

Add an item to the front of this sequence.

Parameters:
item the object to be added.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual int vtkSequenceContainer::Reverse vtkIdType  pos1,
vtkIdType  pos2
[pure virtual]
 

Reverse the sequence ordering in the given range [pos1 ..

pos2] of positions.

Returns:
true on success, otherwise false.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual int vtkSequenceContainer::Reverse void   )  [pure virtual]
 

Reverse the sequence ordering.

Returns:
true on success, otherwise false.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual int vtkSequenceContainer::Rotate vtkIdType  index  )  [pure virtual]
 

Rotates the items in this sequence so that index is the new first element after the call.

Returns:
true on success, otherwise false.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual int vtkSequenceContainer::Shuffle void   )  [pure virtual]
 

Shuffles the order of the items in this sequence using a uniform distribution random number generator.

Returns:
true on success, otherwise false.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual int vtkSequenceContainer::Sort void   )  [pure virtual]
 

Sort the sequence items by address with operator <.

Returns:
true on success, otherwise false.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

virtual int vtkSequenceContainer::Swap vtkSequenceContainer container  )  [pure virtual]
 

Swaps items of this container with those of the specified container.

Returns:
true on success, otherwise false.

virtual int vtkSequenceContainer::Unique void   )  [pure virtual]
 

Removes subsequent duplicates of sequence items so that each item contains a different value than the following item.

Returns:
true on success, otherwise false.

Implemented in vtkObjectBaseDeque, vtkObjectBaseList, and vtkObjectBaseVector.

vtkSequenceContainer::vtkTypeRevisionMacro vtkSequenceContainer  ,
vtkContainer 
 


The documentation for this class was generated from the following file:
Generated on Thu Jul 14 14:40:08 2005 for vtkContainers by doxygen 1.3.6