VTK
9.2.6
|
In VTK, certain classes can have what are called "implementations". More...
Go to the source code of this file.
Functions | |
function | vtk_object_factory_declare () |
Declare a factory override. | |
function | vtk_object_factory_configure () |
Generate source for overrides in a module. |
In VTK, certain classes can have what are called "implementations".
When the base class is requested, it instead looks into a list of available implementations. One of the implementations is then constructed and returned instead.
For instance, there is a vtkRenderWindow class in VTK. When this is constructed, it instead actually returns a window for the X window system, Cocoa, or Win32 depending on what is available.
VTK's implementation utilizes the autoinit logic of the module system. A module which contains an object factory must declare itself as IMPLEMENTABLE and modules which contain an implementation of an object factory must claim that they IMPLEMENTS modules containing those base object factories (a module may contain the object factory and an implementation; it then says that it IMPLEMENTS itself).
Definition in file vtkObjectFactory.cmake.
function vtk_object_factory_declare | ( | ) |
Declare a factory override.
Declare that a class in this module (the implementation) is an OVERRIDE for a base class.
Definition at line 35 of file vtkObjectFactory.cmake.
function vtk_object_factory_configure | ( | ) |
Generate source for overrides in a module.
A module may only have a single declaration of all its object factory implementations. This function generates the source for all of the overrides declared using vtk_object_factory_declare.
Definition at line 91 of file vtkObjectFactory.cmake.