[vtkusers] Check for class type

Leonardo M. Ramé l.rame at griensu.com
Thu Oct 21 08:33:29 EDT 2010


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?

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com



More information about the vtkusers mailing list