[vtk-developers] VTK containers are gone; long live VTKcontainers

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Tue Jan 7 13:34:14 EST 2003


Andy,

> No. vtkObjectBase stays. It is still used for commands etc.

OK. I had some trouble with my wrapping stuff because you implemented some
of the IsTypeMacro code in ObjectBase, but also left some in vtkObject.

vtkObject.h diff below. Basically I've used a TypeRevisionMacro for
vtkObject and moved all the code out so that is is now identical to all the
other classes and only vtkObjectBase has the actual code in it.

< //BTX

< typedef vtkObjectBase Superclass;

< //ETX

<

< // Description:

< // Return the class name as a string. This method is defined

< // in all subclasses of vtkObject with the vtkTypeRevisionMacro found

< // in vtkSetGet.h.

< virtual const char *GetClassName() const {return "vtkObject";};

<

< // Description:

< // Return 1 if this class type is the same type of (or a subclass of)

< // the named class. Returns 0 otherwise. This method works in

< // combination with vtkTypeRevisionMacro found in vtkSetGet.h.

< static int IsTypeOf(const char *name);

<

< // Description:

< // Return 1 if this class is the same type of (or a subclass of)

< // the named class. Returns 0 otherwise. This method works in

< // combination with vtkTypeRevisionMacro found in vtkSetGet.h.

< virtual int IsA(const char *name);

<

< // Description:

< // Will cast the supplied object to vtkObject* is this is a safe operation

< // (i.e., a safe downcast); otherwise NULL is returned. This method is

< // defined in all subclasses of vtkObject with the vtkTypeRevisionMacro

< // found in vtkSetGet.h.

< static vtkObject *SafeDownCast(vtkObject *o);

---

> vtkTypeRevisionMacro(vtkObject,vtkObjectBase);

203,204d175

< virtual void CollectRevisions(ostream& os);

<






More information about the vtk-developers mailing list