MCPcopy Create free account
hub / github.com/Kitware/VTK / vtkVariantCreate

Function vtkVariantCreate

Wrapping/Python/vtkmodules/util/vtkVariant.py:67–77  ·  view source on GitHub ↗

Create a vtkVariant of the specified type, where the type is in the following format: 'int', 'unsigned int', etc. for numeric types, and 'string' for strings. You can also use an integer VTK type constant for the type.

(v, t)

Source from the content-addressed store, hash-verified

65
66
67def vtkVariantCreate(v, t):
68 """
69 Create a vtkVariant of the specified type, where the type is in the
70 following format: 'int', 'unsigned int', etc. for numeric types,
71 and 'string' for strings. You can also use an
72 integer VTK type constant for the type.
73 """
74 if not issubclass(type(t), int):
75 t = _variant_type_map[t]
76
77 return vtkCommonCore.vtkVariant(v, t)
78
79
80def vtkVariantExtract(v, t=None):

Callers

nothing calls this directly

Calls 2

vtkVariantMethod · 0.80
typeEnum · 0.50

Tested by

no test coverage detected