[vtk-developers] Containers and... String

Andy Cedilnik Andy.Cedilnik at kitware.com
Mon Jan 21 14:14:56 EST 2002


Hello!

So, to continue the discussion about containers,
I suggest the following simple hierarchy of containers:

Abstract base class: vtkContainer
	- Defines things such as Number of elements, capacity,
	  interface for clean and is empty

Two abstract subtrees: vtkAssociativeArray and vtkList
	- List defines operations such as:
		Insert, append, prepend, push, pop, lookup,
		find, remove, shift, rotate, etc
	- Associative array defines:
		Set, Remove, Find

List contains:
	- vtkVector, which is a dynamic array implementation of
		List data structure
	- vtkLinkedList, which is a linked list implementation

AssociativeArray contains:
	- vtkHashTable, which is a hash table implementation
	- vtkTree, which is a (red-black) tree implementation
	- vtkArrayTable, which is an array implementation

vtkContainer class is not subclass of vtkObject, so that we
can use containers inside vtkObject class for things such
as Observers.

Comments?

On the side note, I also think we need a vtkSring class.

				Andy






More information about the vtk-developers mailing list