[vtkusers] Check for class type
Georg Ziegler
gziegler at mail.tuwien.ac.at
Thu Oct 21 08:37:20 EDT 2010
try
if (vtkSomeThing::SafeDownCast(caller) != NULL)
{
//do something
} else
{
//do something else
}
Am 21.10.2010 14:33, schrieb Leonardo M. Ramé:
> Hi, I would like to know how to check for class type in a subclassed
> vtkCommand, in the Execute method.
>
> The skeleton of the method is this:
>
> virtual void Execute(vtkObject *caller, unsigned long, void*)
>
> I would like to do something like this:
>
> if(caller is vtkSomeThing)
> {
> // do something
> }
> else
> {
> // do else.
> }
>
> I thought that the "is" operator will work, but it doesn't.
>
> How can I do that?
>
More information about the vtkusers
mailing list