[vtk-developers] Data structures in VTK (Implementation)

Miller, James V (CRD) millerjv at crd.ge.com
Thu Feb 21 12:53:26 EST 2002


STL actually uses very little inheritance.  Rather it relies on duplicating
a prescribed API.  For instance, "vector" and "list" do not share a base 
class.  Instead they just provide similar API's.


-----Original Message-----
From: Andy Cedilnik [mailto:Andy.Cedilnik at kitware.com]
Sent: Thursday, February 21, 2002 10:41 AM
To: Lorensen, William E (CRD); vtk-developers at public.kitware.com
Subject: RE: [vtk-developers] Data structures in VTK (Implementation)


At 12:06 PM 2/20/2002 -0500, Lorensen, William E (CRD) wrote:
>Let's have some more discussion on this...

Ok, people should express more opinions.

>We all agree that STL is just not portable enough for vtk. But...
>maybe we should look at some design elements of STL.

Maybe. Is there anybody on the list who knows all the internals of
STL? What are some of the things from STL we should use?
I suggested the hierarchy of classes:
vtkContainer
-> vtkList
         -> vtkVector
         -> vtkLinkedList
-> vtkAssociative
         -> vtkHashTable
         -> vtkTree

>For example, maybe we should start thinking about iterators. Also, perhaps 
>we should use method names
>that are similar to STL.

About iterators, there is nothing that would prevent us from making iterators.
The design we are proposing can easily include iterators.

Oh, I think method names that are similar to STL are different than what
VTK uses. For example STL uses lower case method names, etc. Also, the
names in our proposal are more consistent with other VTK classes.

                                 Andy


_______________________________________________
vtk-developers mailing list
vtk-developers at public.kitware.com
http://public.kitware.com/mailman/listinfo/vtk-developers



More information about the vtk-developers mailing list