30 #ifndef __vtkTypeTemplate_h
31 #define __vtkTypeTemplate_h
36 template<
class ThisT,
class BaseT>
50 if(o && o->
IsA(
typeid(ThisT).name()))
52 return static_cast<ThisT*
>(o);
69 if(!strcmp(
typeid(ThisT).name(), type))
73 return BaseT::IsTypeOf(type);
79 virtual int IsA(
const char *type)
85 virtual const char* GetClassNameInternal()
const
87 return typeid(ThisT).name();
Provides the equivalent of vtkTypeMacro for use with template classes.
ThisT * NewInstance() const
static int IsTypeOf(const char *type)
static ThisT * SafeDownCast(vtkObjectBase *o)
virtual vtkObjectBase * NewInstanceInternal() const
virtual int IsA(const char *type)
abstract base class for most VTK objects
virtual int IsA(const char *name)