#include <vtkTestingObjectFactory.h>
Some vtk examples and tests need to perform differently when they are run as tests versus when they are run as individual programs. Many tests/examples are interactive and eventually call vtkRenderWindowInteration::Start() to initialie the interaction. But, when run as tests, these programs should exit. This factory overrides vtkRenderWindowInteractor so that the Start() method just returns. To use this factory: include "vtkTestingObjectFactory.h" vtkTestingObjectFactory* factory = vtkTestingObjectFactory::New(); vtkObjectFactory::RegisterFactory(factory);
Definition at line 44 of file vtkTestingObjectFactory.h.
Public Types | |
typedef vtkObjectFactory | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
virtual const char * | GetVTKSourceVersion () |
const char * | GetDescription () |
void | PrintSelf (ostream &os, vtkIndent indent) |
Static Public Member Functions | |
static vtkTestingObjectFactory * | New () |
static int | IsTypeOf (const char *type) |
static vtkTestingObjectFactory * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkTestingObjectFactory () |
vtkTestingObjectFactory::vtkTestingObjectFactory | ( | ) | [protected] |
Register objects that override vtk objects whem they are run as tests.
static vtkTestingObjectFactory* vtkTestingObjectFactory::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject.
virtual const char* vtkTestingObjectFactory::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkObjectFactory.
static int vtkTestingObjectFactory::IsTypeOf | ( | const char * | name | ) | [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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObjectFactory.
virtual int vtkTestingObjectFactory::IsA | ( | const char * | name | ) | [virtual] |
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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObjectFactory.
static vtkTestingObjectFactory* vtkTestingObjectFactory::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkObjectFactory.
virtual const char* vtkTestingObjectFactory::GetVTKSourceVersion | ( | ) | [virtual] |
All sub-classes of vtkObjectFactory should must return the version of VTK they were built with. This should be implemented with the macro VTK_SOURCE_VERSION and NOT a call to vtkVersion::GetVTKSourceVersion. As the version needs to be compiled into the file as a string constant. This is critical to determine possible incompatible dynamic factory loads.
Implements vtkObjectFactory.
const char* vtkTestingObjectFactory::GetDescription | ( | ) | [inline, virtual] |
Return a descriptive string describing the factory.
Implements vtkObjectFactory.
Definition at line 50 of file vtkTestingObjectFactory.h.
void vtkTestingObjectFactory::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
Print ObjectFactory to stream.
Reimplemented from vtkObjectFactory.