[vtkusers] implementing New() in vtk subclasses..
K. R. Subramanian
krs at cs.uncc.edu
Sun Jul 1 18:58:05 EDT 2001
A simple question.. I am subclassing a vtk classes, and I would like
to write a constructor, similar to New(). I notice New() creates
instances from an
object factory (which I must confess I know very little about!). In any
case, the instance
call takes a string argument - is this part of a library of names used
within VTK, or is this
something the user supplies to id the object?
In any case, in subclasses, what is the preferred method to create
objects? Right now,
I am just using the C++ new operator, which I believe is not
recommended for creating vtk objects..
I know you can call the superclass's (which is the vtk object) New()
constructorwithin the
constructor of the subclass, but what do I do with the return value?
Thanks.
-- krs
--
Dr. K.R.Subramanian Phone: (301) 402-0042
National Institutes of Health FAX: (301) 402-4080
National Library of Medicine Email: krs at cs.uncc.edu
Bldg 38A, Rm. B1N30D WWW: www.cs.uncc.edu/~krs
8600 Rockville Pike, Bethesda, MD 20894
More information about the vtkusers
mailing list