VTK
9.1.0
|
Go to the source code of this file.
Classes | |
class | vtkAbstractArray |
Abstract superclass for all arrays. More... | |
struct | vtkArrayDownCast_impl< ArrayT > |
Implementation of vtkArrayDownCast. More... | |
Macros | |
#define | vtkArrayDownCast_FastCastMacro(ArrayT) |
This macro is used to tell vtkArrayDownCast to use FastDownCast instead of SafeDownCast. More... | |
#define | vtkArrayDownCast_TemplateFastCastMacro(ArrayT) |
Same as vtkArrayDownCast_FastCastMacro, but treats ArrayT as a single-parameter template (the parameter is the value type). More... | |
Functions | |
template<typename ArrayT > | |
ArrayT * | vtkArrayDownCast (vtkAbstractArray *array) |
vtkArrayDownCast is to be used by generic (e.g. More... | |
#define vtkArrayDownCast_FastCastMacro | ( | ArrayT | ) |
This macro is used to tell vtkArrayDownCast to use FastDownCast instead of SafeDownCast.
Definition at line 741 of file vtkAbstractArray.h.
#define vtkArrayDownCast_TemplateFastCastMacro | ( | ArrayT | ) |
Same as vtkArrayDownCast_FastCastMacro, but treats ArrayT as a single-parameter template (the parameter is the value type).
Defines a vtkArrayDownCast implementation that uses the specified array template class with any value type.
Definition at line 756 of file vtkAbstractArray.h.
ArrayT * vtkArrayDownCast | ( | vtkAbstractArray * | array | ) |
vtkArrayDownCast is to be used by generic (e.g.
templated) code for quickly downcasting vtkAbstractArray pointers to more derived classes. The typical VTK downcast pattern (SafeDownCast) performs a string comparison on the class names in the object's inheritance hierarchy, which is quite expensive and can dominate computational resource usage when downcasting is needed in a worker function. To address this, certain arrays support a FastDownCast method, which replaces the chain of string comparisons with 1-2 integer comparisons and thus is significantly more efficient. However, not all arrays support the FastDownCast mechanism. vtkArrayDownCast exists to select between the two; Arrays that support FastDownCast will use it, while others will fallback to the slower SafeDownCast.
A more detailed description of this class and related tools can be found here.
Definition at line 729 of file vtkAbstractArray.h.