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

vtkObjectBaseVector Class Reference

#include <vtkObjectBaseVector.h>

Inheritance diagram for vtkObjectBaseVector:

Inheritance graph
[legend]
Collaboration diagram for vtkObjectBaseVector:

Collaboration graph
[legend]
List of all members.

Detailed Description

A dynamic vector of objects.

Calls Register when objects are added to the vector and UnRegister when objects are removed.

Author:
Sean McInerney
Version:
Revision
1.2
Date:
Date
2004/06/03 18:58:28

Definition at line 36 of file vtkObjectBaseVector.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkObjectBaseVector, vtkAbstractSequence)
void PrintSelf (ostream &, vtkIndent)
vtkIdType GetSize (void) const
 Returns the number of elements in the vector.

int IsEmpty (void) const
 Returns true if the vector is empty.

vtkIdType GetMaxSize (void) const
 Returns the maximum size of the vector.

void Clear (void)
 Removes all elements from the vector.

virtual int Swap (vtkObjectBaseVector *container)
 Swaps elements of this object with those of the specified container.

vtkIdType GetCapacity (void) const
 Returns the total number of elements that the vector can hold before needing to allocate more memory.

int SetCapacity (vtkIdType capacity)
 Set the capacity of the vector.

vtkObjectBaseAt (vtkIdType position) const
 Provides access to the data contained in this sequence.

vtkIdType Find (const vtkObjectBase *object) const
 Find an object in the vector.

vtkIdType Find (const vtkObjectBase *object, CompareFunction comparison) const
 Find an object in the vector using a comparison routine.

int Insert (vtkIdType position, vtkObjectBase *object)
 Insert an object at the specific position in this vector.

int PushBack (vtkObjectBase *object)
 Add a pointer to an object to the end of this vector.

int Assign (vtkIdType position, vtkObjectBase *object)
 Sets the object at the specific position to a new value.

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

vtkObjectBaseVectorIteratorCreateIterator (void)
 Create an iterator.

int GetResize (void) const
 Allow or disallow resizing (defaults to true).

void SetResize (int a)
 Allow or disallow resizing (defaults to true).

virtual void ResizeOn ()
 Allow or disallow resizing (defaults to true).

virtual void ResizeOff ()
 Allow or disallow resizing (defaults to true).

Data Access Methods
vtkObjectBaseFront (void) const
 Get a read/write pointer to the first object in the sequence.

vtkObjectBaseBack (void) const
 Get a read/write pointer to the last object in the sequence.


Static Public Member Functions

vtkObjectBaseVectorNew (void)

Protected Member Functions

 vtkObjectBaseVector (void)
 ~vtkObjectBaseVector ()


Constructor & Destructor Documentation

vtkObjectBaseVector::vtkObjectBaseVector void   )  [protected]
 

vtkObjectBaseVector::~vtkObjectBaseVector  )  [protected]
 


Member Function Documentation

int vtkObjectBaseVector::Assign vtkIdType  position,
vtkObjectBase object
[virtual]
 

Sets the object at the specific position to a new value.

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

Implements vtkAbstractSequence.

vtkObjectBase* vtkObjectBaseVector::At vtkIdType  position  )  const [virtual]
 

Provides access to the data contained in this sequence.

Parameters:
position The element index for which data should be accessed.
Returns:
A Read/write pointer to the object if position is a valid index, otherwise null.

Reimplemented from vtkAbstractSequence.

Reimplemented in vtkExtensionsObjectVector, and vtkObjectVector.

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

Get a read/write pointer to the last object in the sequence.

Returns:
null if the sequence is empty, otherwise returns a pointer to an object.

Reimplemented from vtkContainer.

Reimplemented in vtkExtensionsObjectVector, and vtkObjectVector.

void vtkObjectBaseVector::Clear void   )  [virtual]
 

Removes all elements from the vector.

Implements vtkContainer.

vtkObjectBaseVectorIterator* vtkObjectBaseVector::CreateIterator void   )  [virtual]
 

Create an iterator.

Implements vtkAbstractSequence.

Reimplemented in vtkExtensionsObjectVector, and vtkObjectVector.

int vtkObjectBaseVector::Erase vtkIdType  position  )  [virtual]
 

Remove element at the given position.

Parameters:
position An index to the element to be erased.
This function will erase the element at the given position and thus shorten the vector by one.

Implements vtkAbstractSequence.

vtkIdType vtkObjectBaseVector::Find const vtkObjectBase object,
CompareFunction  comparison
const [virtual]
 

Find an object in the vector using a comparison routine.

Returns:
true if it was found, false if it was not found.

Reimplemented from vtkAbstractSequence.

vtkIdType vtkObjectBaseVector::Find const vtkObjectBase object  )  const [virtual]
 

Find an object in the vector.

Returns:
The position if it was found, -1 if it was not found.

Reimplemented from vtkAbstractSequence.

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

Get a read/write pointer to the first object in the sequence.

Returns:
null if the sequence is empty, otherwise returns a pointer to an object.

Reimplemented from vtkContainer.

Reimplemented in vtkExtensionsObjectVector, and vtkObjectVector.

vtkIdType vtkObjectBaseVector::GetCapacity void   )  const [virtual]
 

Returns the total number of elements that the vector can hold before needing to allocate more memory.

Reimplemented from vtkAbstractSequence.

vtkIdType vtkObjectBaseVector::GetMaxSize void   )  const [virtual]
 

Returns the maximum size of the vector.

Reimplemented from vtkContainer.

int vtkObjectBaseVector::GetResize void   )  const
 

Allow or disallow resizing (defaults to true).

vtkIdType vtkObjectBaseVector::GetSize void   )  const [virtual]
 

Returns the number of elements in the vector.

Reimplemented from vtkContainer.

int vtkObjectBaseVector::Insert vtkIdType  position,
vtkObjectBase object
[virtual]
 

Insert an object at the specific position in this vector.

Any objects in the vector at a location greater than position will be shifted by one position to make room for the inserted object.

Parameters:
position An index into the vector.
object Data to be inserted.
Warning:
This can not be used with SetCapacity() because there will be no room for the additional object.

Implements vtkAbstractSequence.

int vtkObjectBaseVector::IsEmpty void   )  const [virtual]
 

Returns true if the vector is empty.

Reimplemented from vtkContainer.

vtkObjectBaseVector* vtkObjectBaseVector::New void   )  [static]
 

Reimplemented from vtkExtensionsObject.

Reimplemented in vtkExtensionsObjectVector, and vtkObjectVector.

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

Reimplemented from vtkAbstractSequence.

int vtkObjectBaseVector::PushBack vtkObjectBase object  )  [virtual]
 

Add a pointer to an object to the end of this vector.

Parameters:
object Data to be added.
This is a typical stack operation. The function creates an element at the end of the sequence and assigns the given pointer to it.

Implements vtkAbstractSequence.

virtual void vtkObjectBaseVector::ResizeOff  )  [virtual]
 

Allow or disallow resizing (defaults to true).

virtual void vtkObjectBaseVector::ResizeOn  )  [virtual]
 

Allow or disallow resizing (defaults to true).

int vtkObjectBaseVector::SetCapacity vtkIdType  capacity  )  [virtual]
 

Set the capacity of the vector.

Returns:
true if successful, false otherwise.
Note:
If capacity is set, the vector will no longer automatically resize.

Implements vtkAbstractSequence.

void vtkObjectBaseVector::SetResize int  a  ) 
 

Allow or disallow resizing (defaults to true).

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

Swaps elements of this object with those of the specified container.

Returns:
true on success, otherwise false.

vtkObjectBaseVector::vtkTypeRevisionMacro vtkObjectBaseVector  ,
vtkAbstractSequence 
 


The documentation for this class was generated from the following file:
Generated on Tue Aug 10 03:42:49 2004 for vtkExtensions by doxygen 1.3.7