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

vtkObjectBaseSet Class Reference

#include <vtkObjectBaseSet.h>

Inheritance diagram for vtkObjectBaseSet:

Inheritance graph
[legend]
Collaboration diagram for vtkObjectBaseSet:

Collaboration graph
[legend]
List of all members.

Detailed Description

A set container for objects.

A set is a Sorted Simple Associative Container that stores objects. It is also a Unique Associative Container, meaning that no two items are the same. Set items are always sorted in ascending order.

Note:
Sets have the important property that inserting a new item into a set does not invalidate iterators that point to existing items. Erasing an item from a set also does not invalidate any iterators, except, of course, for iterators that actually point to the item that is being erased.
Author:
Sean McInerney
Version:
Revision
1.5
Date:
Date
2005/06/24 23:17:16
See also:
vtkObjectBase

Definition at line 43 of file vtkObjectBaseSet.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkObjectBaseSet, vtkContainer)
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 (vtkObjectBaseSet *container)
 Swaps items of this container with those of the specified container.

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

vtkIdType GetCapacity (void) const
 Returns the maximum number of items allowed in this set.

virtual int Find (vtkObjectBase *item) const
 Returns whether the specified item is in this set.

virtual int Insert (vtkIdType position, vtkObjectBase *item)
 Insert an item into this set (optional position hint).

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

virtual int Erase (vtkIdType pos1, vtkIdType pos2)
 Removes the items in the given range of positions.

virtual int Erase (vtkObjectBase *item)
 Removes the item from this set.

vtkObjectBaseSetIterator * CreateIterator (void)
 Create an iterator.

Merging Methods
virtual int CreateUnion (vtkObjectBaseSet *source, vtkObjectBaseSet *destination)
 Merge this set with the source set so that the destination set contains all items that are either in this set, the source set, or in both sets.

virtual int CreateIntersection (vtkObjectBaseSet *source, vtkObjectBaseSet *destination)
 Merge this set with the source set so that the destination set contains all items that are in both sets.

virtual int CreateDifference (vtkObjectBaseSet *source, vtkObjectBaseSet *destination)
 Merge this set with the source set so that the destination set contains all items that are in this set, but not in the source set.

virtual int CreateSymmetricDifference (vtkObjectBaseSet *source, vtkObjectBaseSet *destination)
 Merge this set with the source set so that the destination set contains all items that are either in this set or in the source set, but not in both.

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

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


Static Public Member Functions

vtkObjectBaseSet * New (void)

Protected Member Functions

 vtkObjectBaseSet (void)
 ~vtkObjectBaseSet ()
void ReportReferences (vtkGarbageCollector *)

Friends

class vtkObjectBaseSetIterator


Constructor & Destructor Documentation

vtkObjectBaseSet::vtkObjectBaseSet (  void   )  [protected]
 

vtkObjectBaseSet::~vtkObjectBaseSet (   )  [protected]
 


Member Function Documentation

vtkObjectBase* vtkObjectBaseSet::Back (  void   )  const [virtual]
 

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

Reimplemented from vtkContainer.

Reimplemented in vtkObjectSet.

virtual int vtkObjectBaseSet::Clear (  void   )  [virtual]
 

Erase ALL items in the container.

Returns:
true on success, false otherwise.

Implements vtkContainer.

virtual int vtkObjectBaseSet::Copy (  vtkObjectBaseSet *  container  )  [virtual]
 

Copy all items from the specified container into this container.

Returns:
true on success, otherwise false.

virtual int vtkObjectBaseSet::CreateDifference (  vtkObjectBaseSet *  source,
vtkObjectBaseSet *  destination
)  [virtual]
 

Merge this set with the source set so that the destination set contains all items that are in this set, but not in the source set.

Neither this set nor the source set are modified.

Note:
If this set and the source set are the same, the destination set will be empty after the call.
Warning:
The destination set must not be the same this set or the source set.
Returns:
true on success, otherwise false.

virtual int vtkObjectBaseSet::CreateIntersection (  vtkObjectBaseSet *  source,
vtkObjectBaseSet *  destination
)  [virtual]
 

Merge this set with the source set so that the destination set contains all items that are in both sets.

Neither this set nor the source set are modified.

Note:
If this set and the source set are the same, the destination set will contain a copy of this set after the call.
Warning:
The destination set must not be the same this set or the source set.
Returns:
true on success, otherwise false.

vtkObjectBaseSetIterator* vtkObjectBaseSet::CreateIterator (  void   )  [virtual]
 

Create an iterator.

Implements vtkContainer.

Reimplemented in vtkObjectSet.

virtual int vtkObjectBaseSet::CreateSymmetricDifference (  vtkObjectBaseSet *  source,
vtkObjectBaseSet *  destination
)  [virtual]
 

Merge this set with the source set so that the destination set contains all items that are either in this set or in the source set, but not in both.

Neither this set nor the source set are modified.

Note:
If this set and the source set are the same, the destination set will be empty after the call.
Warning:
The destination set must not be the same this set or the source set.
Returns:
true on success, otherwise false.

virtual int vtkObjectBaseSet::CreateUnion (  vtkObjectBaseSet *  source,
vtkObjectBaseSet *  destination
)  [virtual]
 

Merge this set with the source set so that the destination set contains all items that are either in this set, the source set, or in both sets.

Neither this set nor the source set are modified.

Note:
If this set and the source set are the same, the destination set will contain a copy of this set after the call.
Warning:
The destination set must not be the same this set or the source set.
Returns:
true on success, otherwise false.

virtual int vtkObjectBaseSet::Erase (  vtkObjectBase *  item  )  [virtual]
 

Removes the item from this set.

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

virtual int vtkObjectBaseSet::Erase (  vtkIdType  pos1,
vtkIdType  pos2
)  [virtual]
 

Removes the items in the given range of positions.

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

virtual int vtkObjectBaseSet::Erase (  vtkIdType  position  )  [virtual]
 

Remove the item at the given position.

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

virtual int vtkObjectBaseSet::Find (  vtkObjectBase *  item  )  const [virtual]
 

Returns whether the specified item is in this set.

Returns:
true if found, false otherwise.

vtkObjectBase* vtkObjectBaseSet::Front (  void   )  const [virtual]
 

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

Reimplemented from vtkContainer.

Reimplemented in vtkObjectSet.

vtkIdType vtkObjectBaseSet::GetCapacity (  void   )  const
 

Returns the maximum number of items allowed in this set.

virtual vtkIdType vtkObjectBaseSet::GetMaxSize (  void   )  const [virtual]
 

Returns the maximum size of this container.

Reimplemented from vtkContainer.

virtual vtkIdType vtkObjectBaseSet::GetSize (  void   )  const [virtual]
 

Returns the number of items in the container.

Reimplemented from vtkContainer.

virtual int vtkObjectBaseSet::Insert (  vtkIdType  position,
vtkObjectBase *  item
)  [virtual]
 

Insert an item into this set (optional position hint).

Returns:
true on success, false otherwise.

virtual int vtkObjectBaseSet::IsEmpty (  void   )  const [virtual]
 

Returns true if this container is empty.

Reimplemented from vtkContainer.

vtkObjectBaseSet* vtkObjectBaseSet::New (  void   )  [static]
 

Reimplemented from vtkObject.

Reimplemented in vtkObjectSet.

void vtkObjectBaseSet::PrintSelf (  ostream &  ,
vtkIndent 
)  [virtual]
 

Reimplemented from vtkContainer.

Reimplemented in vtkObjectSet.

void vtkObjectBaseSet::ReportReferences (  vtkGarbageCollector *   )  [protected]
 

virtual int vtkObjectBaseSet::Swap (  vtkObjectBaseSet *  container  )  [virtual]
 

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

Returns:
true on success, otherwise false.

vtkObjectBaseSet::vtkTypeRevisionMacro (  vtkObjectBaseSet  ,
vtkContainer 
) 
 


Friends And Related Function Documentation

friend class vtkObjectBaseSetIterator [friend]
 

Definition at line 203 of file vtkObjectBaseSet.h.


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