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

vtkObjectBaseDeque Class Reference

#include <vtkObjectBaseDeque.h>

Inheritance diagram for vtkObjectBaseDeque:

Inheritance graph
[legend]
Collaboration diagram for vtkObjectBaseDeque:

Collaboration graph
[legend]
List of all members.

Detailed Description

A deque object for objects.

A deque is very much like a vector: like vector, it is a sequence that supports random access to items, constant time insertion and removal of items at the end of the sequence, and linear time insertion and removal of items in the middle.

The main way in which deque differs from vector is that deque also supports constant time insertion and removal of items at the beginning of the sequence.

Author:
Sean McInerney
Version:
Revision
1.4
Date:
Date
2005/06/24 23:17:16
See also:
vtkObjectBase

Definition at line 42 of file vtkObjectBaseDeque.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkObjectBaseDeque, vtkSequenceContainer)
void PrintSelf (ostream &, vtkIndent)
virtual vtkIdType GetSize (void) const
 Returns the number of items in the container.

virtual int IsEmpty (void) const
 Returns true if this container is empty.

virtual vtkIdType GetMaxSize (void) const
 Returns the maximum size of this container.

virtual int Clear (void)
 Erase ALL items in the container.

virtual int Swap (vtkObjectBaseDeque *container)
 Swaps items of this container with those of the specified container.

virtual int Copy (vtkObjectBaseDeque *container)
 Copy all items from the specified container into this container.

vtkObjectBaseDequeIteratorCreateIterator (void)
 Create an iterator.

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

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

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

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

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

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

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

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

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

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

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

Atypical Operations
int Erase (vtkObjectBase *item)
 Remove the first occurence of the given item from the sequence.

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

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

int Reverse (void)
 Reverse the sequence ordering.

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

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

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

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

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

Data Access Methods
vtkObjectBaseFront (void) const
 Returns the first item in the container, or null if the container is empty.

vtkObjectBaseBack (void) const
 Returns the last item in the container, or null if the container is empty.


Static Public Member Functions

vtkObjectBaseDequeNew (void)

Protected Member Functions

 vtkObjectBaseDeque (void)
 ~vtkObjectBaseDeque ()
void ReportReferences (vtkGarbageCollector *)

Friends

class vtkObjectBaseDequeIterator


Constructor & Destructor Documentation

vtkObjectBaseDeque::vtkObjectBaseDeque void   )  [protected]
 

vtkObjectBaseDeque::~vtkObjectBaseDeque  )  [protected]
 


Member Function Documentation

virtual int vtkObjectBaseDeque::Assign vtkIdType  position,
vtkObjectBase item
[virtual]
 

Assigns item to the specified position replacing the existant item.

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

Implements vtkSequenceContainer.

virtual vtkObjectBase* vtkObjectBaseDeque::At vtkIdType  position  )  const [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 from vtkSequenceContainer.

Reimplemented in vtkObjectDeque.

vtkObjectBase* vtkObjectBaseDeque::Back void   )  const [virtual]
 

Returns the last item in the container, or null if the container is empty.

Reimplemented from vtkContainer.

Reimplemented in vtkObjectDeque.

int vtkObjectBaseDeque::Clear vtkObjectBase object  )  [virtual]
 

Remove all occurrences of the given item from the sequence.

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

Implements vtkSequenceContainer.

virtual int vtkObjectBaseDeque::Clear void   )  [virtual]
 

Erase ALL items in the container.

Returns:
true on success, false otherwise.

Implements vtkContainer.

virtual int vtkObjectBaseDeque::Copy vtkObjectBaseDeque container  )  [virtual]
 

Copy all items from the specified container into this container.

Returns:
true on success, otherwise false.

vtkObjectBaseDequeIterator* vtkObjectBaseDeque::CreateIterator void   )  [virtual]
 

Create an iterator.

Implements vtkSequenceContainer.

Reimplemented in vtkObjectDeque.

int vtkObjectBaseDeque::Erase vtkObjectBase item  )  [virtual]
 

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

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

Implements vtkSequenceContainer.

int vtkObjectBaseDeque::Erase vtkIdType  pos1,
vtkIdType  pos2
[virtual]
 

Remove the items in the given range [pos1 ..

pos2] of positions.

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

Implements vtkSequenceContainer.

int vtkObjectBaseDeque::Erase vtkIdType  position  )  [virtual]
 

Remove the item at the given position.

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

Implements vtkSequenceContainer.

vtkIdType vtkObjectBaseDeque::Find vtkObjectBase item  )  const [virtual]
 

Find the first occurence of an item in the sequence.

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

Reimplemented from vtkSequenceContainer.

vtkObjectBase* vtkObjectBaseDeque::Front void   )  const [virtual]
 

Returns the first item in the container, or null if the container is empty.

Reimplemented from vtkContainer.

Reimplemented in vtkObjectDeque.

virtual vtkIdType vtkObjectBaseDeque::GetMaxSize void   )  const [virtual]
 

Returns the maximum size of this container.

Reimplemented from vtkContainer.

virtual vtkIdType vtkObjectBaseDeque::GetSize void   )  const [virtual]
 

Returns the number of items in the container.

Reimplemented from vtkContainer.

virtual int vtkObjectBaseDeque::Insert vtkIdType  position,
vtkObjectBaseDeque sequence,
vtkIdType  seqBeg,
vtkIdType  seqEnd
[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:
This may invalidate iterators.
Returns:
true on success, false otherwise.

virtual int vtkObjectBaseDeque::Insert vtkIdType  position,
vtkObjectBaseDeque sequence
[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:
This may invalidate iterators.
Returns:
true on success, false otherwise.

virtual int vtkObjectBaseDeque::Insert vtkIdType  position,
vtkObjectBase item
[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:
This may invalidate iterators.
Returns:
true on success, false otherwise.

Implements vtkSequenceContainer.

virtual int vtkObjectBaseDeque::IsEmpty void   )  const [virtual]
 

Returns true if this container is empty.

Reimplemented from vtkContainer.

vtkObjectBaseDeque* vtkObjectBaseDeque::New void   )  [static]
 

Reimplemented from vtkObject.

Reimplemented in vtkObjectDeque.

int vtkObjectBaseDeque::PopBack void   )  [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.

Implements vtkSequenceContainer.

int vtkObjectBaseDeque::PopFront void   )  [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.

Implements vtkSequenceContainer.

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

Reimplemented from vtkSequenceContainer.

Reimplemented in vtkObjectDeque.

virtual int vtkObjectBaseDeque::PushBack vtkObjectBase item  )  [virtual]
 

Add an item to the end of this sequence.

Parameters:
item the object to be added.

Implements vtkSequenceContainer.

virtual int vtkObjectBaseDeque::PushFront vtkObjectBase item  )  [virtual]
 

Add an item to the front of this sequence.

Parameters:
item the object to be added.

Implements vtkSequenceContainer.

void vtkObjectBaseDeque::ReportReferences vtkGarbageCollector *   )  [protected]
 

int vtkObjectBaseDeque::Reverse vtkIdType  pos1,
vtkIdType  pos2
[virtual]
 

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

pos2] of positions.

Returns:
true on success, otherwise false.

Implements vtkSequenceContainer.

int vtkObjectBaseDeque::Reverse void   )  [virtual]
 

Reverse the sequence ordering.

Returns:
true on success, otherwise false.

Implements vtkSequenceContainer.

int vtkObjectBaseDeque::Rotate vtkIdType  index  )  [virtual]
 

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

Returns:
true on success, otherwise false.

Implements vtkSequenceContainer.

int vtkObjectBaseDeque::Shuffle void   )  [virtual]
 

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

Returns:
true on success, otherwise false.

Implements vtkSequenceContainer.

int vtkObjectBaseDeque::Sort void   )  [virtual]
 

Sort the sequence items by address with operator <.

Returns:
true on success, otherwise false.

Implements vtkSequenceContainer.

virtual int vtkObjectBaseDeque::Swap vtkObjectBaseDeque container  )  [virtual]
 

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

Returns:
true on success, otherwise false.

int vtkObjectBaseDeque::Unique void   )  [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.

Implements vtkSequenceContainer.

vtkObjectBaseDeque::vtkTypeRevisionMacro vtkObjectBaseDeque  ,
vtkSequenceContainer 
 


Friends And Related Function Documentation

friend class vtkObjectBaseDequeIterator [friend]
 

Definition at line 272 of file vtkObjectBaseDeque.h.


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