File: vtkobjectfactory.mdc

package info (click to toggle)
freemat 4.2%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 141,800 kB
  • ctags: 14,082
  • sloc: ansic: 126,788; cpp: 62,046; python: 2,080; perl: 1,255; sh: 1,146; yacc: 1,019; lex: 239; makefile: 100
file content (87 lines) | stat: -rw-r--r-- 3,652 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

 Usage

vtkObjectFactory is used to create vtk objects. The base
class vtkObjectFactory contains a static method
CreateInstance which is used to create vtk objects from the
list of registered vtkObjectFactory sub-classes. The first
time CreateInstance is called, all dll's or shared libraries
in the environment variable VTK_AUTOLOAD_PATH are loaded
into the current process. The C functions vtkLoad,
vtkGetFactoryCompilerUsed, and vtkGetFactoryVersion are
called on each dll. To implement these functions in a shared
library or dll, use the macro:
VTK_FACTORY_INTERFACE_IMPLEMENT. VTK_AUTOLOAD_PATH is an
environment variable containing a colon separated (semi-
colon on win32) list of paths.
The vtkObjectFactory can be use to override the creation of
any object in VTK with a sub-class of that object. The
factories can be registered either at run time with the
VTK_AUTOLOAD_PATH, or at compile time with the
vtkObjectFactory::RegisterFactory method.
To create an instance of class vtkObjectFactory, simply
invoke its constructor as follows

    obj = vtkObjectFactory



 Methods

The class vtkObjectFactory has several methods that can be
used. They are listed below. Note that the documentation is
translated automatically from the VTK sources, and may not
be completely intelligible. When in doubt, consult the VTK
website. In the methods listed below, obj is an instance of
the vtkObjectFactory class.

* string = obj.GetClassName ()
* int = obj.IsA (string name)
* vtkObjectFactory = obj.NewInstance ()
* vtkObjectFactory = obj.SafeDownCast (vtkObject o)
* string = obj.GetVTKSourceVersion () - 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.
* string = obj.GetDescription () - Return a descriptive
  string describing the factory.
* int = obj.GetNumberOfOverrides () - Return number of
  overrides this factory can create.
* string = obj.GetClassOverrideName (int index) - Return the
  name of a class override at the given index.
* string = obj.GetClassOverrideWithName (int index) - Return
  the name of the class that will override the class at the
  given index
* int = obj.GetEnableFlag (int index) - Return the enable
  flag for the class at the given index.
* string = obj.GetOverrideDescription (int index) - Return
  the description for a the class override at the given
  index.
* obj.SetEnableFlag (int flag, string className, string
  subclassName) - Set and Get the Enable flag for the
  specific override of className. if subclassName is null,
  then it is ignored.
* int = obj.GetEnableFlag (string className, string
  subclassName) - Set and Get the Enable flag for the
  specific override of className. if subclassName is null,
  then it is ignored.
* int = obj.HasOverride (string className) - Return 1 if
  this factory overrides the given class name, 0 otherwise.
* int = obj.HasOverride (string className, string
  subclassName) - Return 1 if this factory overrides the
  given class name, 0 otherwise.
* obj.Disable (string className) - Set all enable flags for
  the given class to 0. This will mean that the factory will
  stop producing class with the given name.
* string = obj.GetLibraryPath () - This returns the path to
  a dynamically loaded factory.


* FreeMat_Documentation
* Visualization_Toolkit_Common_Classes
* Generated on Thu Jul 25 2013 17:18:30 for FreeMat by
  doxygen_ 1.8.1.1