VTK  9.4.20241016
vtkStructuredPointArray.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#ifndef vtkStructuredPointArray_h
4#define vtkStructuredPointArray_h
5
6#ifdef VTK_STRUCTURED_POINT_ARRAY_INSTANTIATING
7#define VTK_IMPLICIT_VALUERANGE_INSTANTIATING
8#include "vtkDataArrayPrivate.txx"
9#endif
10
11#include "vtkCommonCoreModule.h" // For export macro
12#include "vtkImplicitArray.h" // For vtkImplicitArray
13#include "vtkSmartPointer.h" // For vtkSmartPointer
14#include "vtkStructuredPointBackend.h" // For vtkStructuredPointBackend
15
16#ifdef VTK_STRUCTURED_POINT_ARRAY_INSTANTIATING
17#undef VTK_IMPLICIT_VALUERANGE_INSTANTIATING
18#endif
19
31VTK_ABI_NAMESPACE_BEGIN
32template <typename ValueType>
34VTK_ABI_NAMESPACE_END
35
36namespace vtk
37{
38VTK_ABI_NAMESPACE_BEGIN
45template <typename ValueType>
47 vtkDataArray* xCoords, vtkDataArray* yCoords, vtkDataArray* zCoords, int extent[6],
48 int dataDescription, double dirMatrix[9]);
49VTK_ABI_NAMESPACE_END
50}
51
52#endif // vtkStructuredPointArray_h
53
54#ifdef VTK_STRUCTURED_POINT_ARRAY_INSTANTIATING
55// The instantiation is separated in two functions because the .txx includes vtkArrayDispatch.h
56// which when Dispatching is enabled, it instantiates a class with a value type, before exporting it
57#define VTK_INSTANTIATE_STRUCTURED_POINT_ARRAY_EXPORT(ValueType) \
58 VTK_ABI_NAMESPACE_BEGIN \
59 template class VTKCOMMONCORE_EXPORT vtkImplicitArray<vtkStructuredPointBackend<ValueType>>; \
60 VTK_ABI_NAMESPACE_END
61
62#define VTK_INSTANTIATE_STRUCTURED_POINT_ARRAY_FUNCTIONS(ValueType) \
63 namespace vtk \
64 { \
65 VTK_ABI_NAMESPACE_BEGIN \
66 template VTKCOMMONCORE_EXPORT \
67 vtkSmartPointer<vtkImplicitArray<vtkStructuredPointBackend<ValueType>>> \
68 CreateStructuredPointArray(vtkDataArray* xCoords, vtkDataArray* yCoords, \
69 vtkDataArray* zCoords, int extent[6], int dataDescription, double dirMatrix[9]); \
70 VTK_ABI_NAMESPACE_END \
71 } \
72 namespace vtkDataArrayPrivate \
73 { \
74 VTK_ABI_NAMESPACE_BEGIN \
75 VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE( \
76 vtkImplicitArray<vtkStructuredPointBackend<ValueType>>, double) \
77 VTK_ABI_NAMESPACE_END \
78 }
79
80#elif defined(VTK_USE_EXTERN_TEMPLATE)
81#ifndef VTK_STRUCTURED_POINT_ARRAY_TEMPLATE_EXTERN
82#define VTK_STRUCTURED_POINT_ARRAY_TEMPLATE_EXTERN
83#ifdef _MSC_VER
84#pragma warning(push)
85// The following is needed when the vtkCompositeArray is declared
86// dllexport and is used from another class in vtkCommonCore
87#pragma warning(disable : 4910) // extern and dllexport incompatible
88#endif
89VTK_ABI_NAMESPACE_BEGIN
91 extern template class VTKCOMMONCORE_EXPORT vtkImplicitArray, vtkStructuredPointBackend);
92#ifdef _MSC_VER
93#pragma warning(pop)
94#endif
95VTK_ABI_NAMESPACE_END
96#endif // VTK_STRUCTURED_POINT_ARRAY_TEMPLATE_EXTERN
97// The following clause is only for MSVC 2008 and 2010
98#elif defined(_MSC_VER) && !defined(VTK_BUILD_SHARED_LIBS)
99#pragma warning(push)
100// C4091: 'extern ' : ignored on left of 'int' when no variable is declared
101#pragma warning(disable : 4091)
102
103// Compiler-specific extension warning.
104#pragma warning(disable : 4231)
105
106// We need to disable warning 4910 and do an extern dllexport
107// anyway. When deriving new arrays from an
108// instantiation of this template the compiler does an explicit
109// instantiation of the base class. From outside the vtkCommon
110// library we block this using an extern dllimport instantiation.
111// For classes inside vtkCommon we should be able to just do an
112// extern instantiation, but VS 2008 complains about missing
113// definitions. We cannot do an extern dllimport inside vtkCommon
114// since the symbols are local to the dll. An extern dllexport
115// seems to be the only way to convince VS 2008 to do the right
116// thing, so we just disable the warning.
117#pragma warning(disable : 4910) // extern and dllexport incompatible
118
119// Use an "extern explicit instantiation" to give the class a DLL
120// interface. This is a compiler-specific extension.
121VTK_ABI_NAMESPACE_BEGIN
123 extern template class VTKCOMMONCORE_EXPORT vtkImplicitArray, vtkStructuredPointBackend);
124
125#pragma warning(pop)
126
127VTK_ABI_NAMESPACE_END
128#endif
abstract superclass for arrays of numeric data
A read only array class that wraps an implicit function from integers to any value type supported by ...
Hold a reference to a vtkObjectBase instance.
An structured point array used by structured datasets subclasses.
A backend for the vtkImplicitArray to query structured points efficiently.
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
vtkSmartPointer< vtkImplicitArray< vtkStructuredPointBackend< ValueType > > > CreateStructuredPointArray(vtkDataArray *xCoords, vtkDataArray *yCoords, vtkDataArray *zCoords, int extent[6], int dataDescription, double dirMatrix[9])
Create an implicit point array from the given coordinates and direction matrix which is optional.
#define vtkInstantiateSecondOrderTemplateMacro(decl0, decl1)
Definition vtkType.h:378
#define vtkExternSecondOrderTemplateMacro(decl0, decl1)
Definition vtkType.h:411