VTK  9.5.20251009
vtkAffineArray.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3// Funded by CEA, DAM, DIF, F-91297 Arpajon, France
4#ifndef vtkAffineArray_h
5#define vtkAffineArray_h
6
7#ifdef VTK_AFFINE_ARRAY_INSTANTIATING
8#define VTK_IMPLICIT_VALUERANGE_INSTANTIATING
9#include "vtkDataArrayPrivate.txx"
10#endif
11
12#include "vtkAffineImplicitBackend.h" // for the array backend
13#include "vtkCommonCoreModule.h" // for export macro
14#include "vtkImplicitArray.h"
15
16#ifdef VTK_AFFINE_ARRAY_INSTANTIATING
17#undef VTK_IMPLICIT_VALUERANGE_INSTANTIATING
18#endif
19
31VTK_ABI_NAMESPACE_BEGIN
32template <typename T>
34VTK_ABI_NAMESPACE_END
35
36#endif // vtkAffineArray_h
37
38#ifdef VTK_AFFINE_ARRAY_INSTANTIATING
39
40#define VTK_INSTANTIATE_AFFINE_ARRAY(ValueType) \
41 VTK_ABI_NAMESPACE_BEGIN \
42 template class VTKCOMMONCORE_EXPORT \
43 vtkImplicitArray<vtkAffineImplicitBackend<ValueType>, vtkArrayTypes::AffineArray>; \
44 VTK_ABI_NAMESPACE_END \
45 namespace vtkDataArrayPrivate \
46 { \
47 VTK_ABI_NAMESPACE_BEGIN \
48 VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE( \
49 VTK_WRAP_TEMPLATE( \
50 vtkImplicitArray<vtkAffineImplicitBackend<ValueType>, vtkArrayTypes::AffineArray>), \
51 double) \
52 VTK_ABI_NAMESPACE_END \
53 }
54#elif defined(VTK_USE_EXTERN_TEMPLATE)
55#ifndef VTK_AFFINE_ARRAY_TEMPLATE_EXTERN
56#define VTK_AFFINE_ARRAY_TEMPLATE_EXTERN
57#ifdef _MSC_VER
58#pragma warning(push)
59// The following is needed when the vtkAffineArray is declared
60// dllexport and is used from another class in vtkCommonCore
61#pragma warning(disable : 4910) // extern and dllexport incompatible
62#endif
63VTK_ABI_NAMESPACE_BEGIN
65 extern template class VTKCOMMONCORE_EXPORT vtkImplicitArray, vtkAffineImplicitBackend,
67#ifdef _MSC_VER
68#pragma warning(pop)
69#endif
70VTK_ABI_NAMESPACE_END
71#endif // VTK_AFFINE_ARRAY_TEMPLATE_EXTERN
72// The following clause is only for MSVC 2008 and 2010
73#elif defined(_MSC_VER) && !defined(VTK_BUILD_SHARED_LIBS)
74#pragma warning(push)
75// C4091: 'extern ' : ignored on left of 'int' when no variable is declared
76#pragma warning(disable : 4091)
77
78// Compiler-specific extension warning.
79#pragma warning(disable : 4231)
80
81// We need to disable warning 4910 and do an extern dllexport
82// anyway. When deriving new arrays from an
83// instantiation of this template the compiler does an explicit
84// instantiation of the base class. From outside the vtkCommon
85// library we block this using an extern dllimport instantiation.
86// For classes inside vtkCommon we should be able to just do an
87// extern instantiation, but VS 2008 complains about missing
88// definitions. We cannot do an extern dllimport inside vtkCommon
89// since the symbols are local to the dll. An extern dllexport
90// seems to be the only way to convince VS 2008 to do the right
91// thing, so we just disable the warning.
92#pragma warning(disable : 4910) // extern and dllexport incompatible
93
94// Use an "extern explicit instantiation" to give the class a DLL
95// interface. This is a compiler-specific extension.
96VTK_ABI_NAMESPACE_BEGIN
98 extern template class VTKCOMMONCORE_EXPORT vtkImplicitArray, vtkAffineImplicitBackend,
100
101#pragma warning(pop)
102
103VTK_ABI_NAMESPACE_END
104#endif
A read only array class that wraps an implicit function from integers to any value type supported by ...
A utility structure serving as a backend for affine (as a function of the index) implicit arrays.
#define vtkInstantiateSecondOrderWithParameterTemplateMacro(decl0, decl1, par)
Definition vtkType.h:445
@ AffineArray
Definition vtkType.h:91
#define vtkExternSecondOrderWithParameterTemplateMacro(decl0, decl1, par)
Definition vtkType.h:495