|
VTK
9.4.2
|
#include "vtkCommonCoreModule.h"#include "vtkIdList.h"#include "vtkObject.h"#include "vtkVariant.h"#include "vtkWrappingHints.h"#include "vtk_nlohmannjson.h"#include <VTK_NLOHMANN_JSON(json_fwd.hpp)>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. | |
| #define | vtkArrayDownCast_TemplateFastCastMacro(ArrayT) |
| Same as vtkArrayDownCast_FastCastMacro, but treats ArrayT as a single-parameter template (the parameter is the value type). | |
Functions | |
| template<typename ArrayT > | |
| ArrayT * | vtkArrayDownCast (vtkAbstractArray *array) |
| vtkArrayDownCast is to be used by generic (e.g. | |
| #define vtkArrayDownCast_FastCastMacro | ( | ArrayT | ) |
This macro is used to tell vtkArrayDownCast to use FastDownCast instead of SafeDownCast.
Definition at line 777 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 795 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 763 of file vtkAbstractArray.h.