[vtkusers] syntax question

tom fogal tfogal at apollo.sr.unh.edu
Tue Jun 8 14:25:34 EDT 2004


AJ, use Bclass' New() member function.

You should derive Bclass (and Aclass, for that matter) from a
vtkObject and it will then automagically obtain the vtkObject::New()
member function.

Also, you should make sure your vtk* objects have their constructors
and destructors declared as protected, and additionally that the
destructors are declared virtual.

HTH,

-tom

 <BAY99-F504GCjNNsqlt0003748a at hotmail.com>"A J" writes:
>Hi,
>
>Say I have my own classes called Aclass and Bclass
>
>and say I have now wrapped these to VTK classes so they are now known as 
>vtkAclass and vtkBclass
>
>Originally, I had:
>
>class Aclass
>{
>
>public:
>Bclass *stuff = new Bclass[ number ]
>  ....
>}
>
>
>So now that Aclass has become vtkAclass and same for vtkBclass.. what is the 
>syntax to do this with the New() operator that I now have to use..?  I had 
>tried a few things but nothign works so far.. it must be something very 
>basic..! =S
>
>Thanks!!
>
>_________________________________________________________________
>Watch the online reality show Mixed Messages with a friend and enter to win 
>a trip to NY 
>http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list