[vtkusers] How to use "IsTypeOf "?

N Smethurst nick.smethurst at free.fr
Sun Oct 26 08:57:22 EST 2003


It's just a way of checking the type of an object without using a dynamic 
cast.

if you did this:

int m = randomObject->IsTypeOf("vtkDataSet");

then m would be 1 if the random object is any kind of vtkDataSet, otherwise m 
would be 0.

Le Dimanche 26 Octobre 2003 12:57, B.su a écrit :
> Hi vtkusers:
>
>    In help documents ,it says :
>
>               int vtkCellPicker::IsTypeOf  (  const char *    type  ) 
> [static]
>
>  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.
>
>    What is the meaning of "the named class" ? How to call this function?
>     Thanks a lot.
>
> ----------------------------
>       B.su




More information about the vtkusers mailing list