vtkmodules.util.vtkVariant
#
Utility functions to mimic the template support functions for vtkVariant
Module Contents#
Classes#
A key method (class, actually) for use with sort() |
Functions#
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. |
|
Extract the specified value type from the vtkVariant, 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. Set the type to ‘None” to extract the value in its native type. |
|
Cast the vtkVariant to the specified value 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. |
|
Compare variants by type first, and then by value. |
|
Check two variants for strict equality of type and value. |
|
Return true if s1 < s2. |
|
Return true if s1 == s2. |
Data#
API#
- vtkmodules.util.vtkVariant._variant_type_map#
None
- vtkmodules.util.vtkVariant._variant_method_map#
None
- vtkmodules.util.vtkVariant._variant_check_map#
None
- vtkmodules.util.vtkVariant.vtkVariantCreate(v, t)#
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.
- vtkmodules.util.vtkVariant.vtkVariantExtract(v, t=None)#
Extract the specified value type from the vtkVariant, 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. Set the type to ‘None” to extract the value in its native type.
- vtkmodules.util.vtkVariant.vtkVariantCast(v, t)#
Cast the vtkVariant to the specified value 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.
- vtkmodules.util.vtkVariant.vtkVariantStrictWeakOrder(s1, s2)#
Compare variants by type first, and then by value.
- class vtkmodules.util.vtkVariant.vtkVariantStrictWeakOrderKey(obj, *args)#
A key method (class, actually) for use with sort()
Initialization
- __lt__(other)#
- vtkmodules.util.vtkVariant.vtkVariantStrictEquality(s1, s2)#
Check two variants for strict equality of type and value.
- vtkmodules.util.vtkVariant.vtkVariantLessThan(s1, s2)#
Return true if s1 < s2.
- vtkmodules.util.vtkVariant.vtkVariantEqual(s1, s2)#
Return true if s1 == s2.