VTK  9.5.20251109
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>
35VTK_ABI_NAMESPACE_END
36
37namespace vtk
38{
39VTK_ABI_NAMESPACE_BEGIN
46template <typename ValueType>
50 int extent[6], int dataDescription, double dirMatrix[9]);
51VTK_ABI_NAMESPACE_END
52}
53
54#endif // vtkStructuredPointArray_h
55
56#ifdef VTK_STRUCTURED_POINT_ARRAY_INSTANTIATING
57// The instantiation is separated in two functions because the .txx includes vtkArrayDispatch.h
58// which when Dispatching is enabled, it instantiates a class with a value type, before exporting it
59#define VTK_INSTANTIATE_STRUCTURED_POINT_ARRAY_EXPORT(ValueType) \
60 VTK_ABI_NAMESPACE_BEGIN \
61 template class VTKCOMMONCORE_EXPORT vtkImplicitArray<vtkStructuredPointBackend<ValueType>, \
62 vtkArrayTypes::VTK_STRUCTURED_POINT_ARRAY>; \
63 VTK_ABI_NAMESPACE_END
64
65#define VTK_INSTANTIATE_STRUCTURED_POINT_ARRAY_FUNCTIONS(ValueType) \
66 namespace vtk \
67 { \
68 VTK_ABI_NAMESPACE_BEGIN \
69 template VTKCOMMONCORE_EXPORT vtkSmartPointer<vtkImplicitArray< \
70 vtkStructuredPointBackend<ValueType>, vtkArrayTypes::VTK_STRUCTURED_POINT_ARRAY>> \
71 CreateStructuredPointArray(vtkDataArray* xCoords, vtkDataArray* yCoords, vtkDataArray* zCoords, \
72 int extent[6], int dataDescription, double dirMatrix[9]); \
73 VTK_ABI_NAMESPACE_END \
74 } \
75 namespace vtkDataArrayPrivate \
76 { \
77 VTK_ABI_NAMESPACE_BEGIN \
78 VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE( \
79 VTK_WRAP_TEMPLATE(vtkImplicitArray<vtkStructuredPointBackend<ValueType>, \
80 vtkArrayTypes::VTK_STRUCTURED_POINT_ARRAY>), \
81 double) \
82 VTK_ABI_NAMESPACE_END \
83 }
84
85#elif defined(VTK_USE_EXTERN_TEMPLATE)
86#ifndef VTK_STRUCTURED_POINT_ARRAY_TEMPLATE_EXTERN
87#define VTK_STRUCTURED_POINT_ARRAY_TEMPLATE_EXTERN
88#ifdef _MSC_VER
89#pragma warning(push)
90// The following is needed when the vtkCompositeArray is declared
91// dllexport and is used from another class in vtkCommonCore
92#pragma warning(disable : 4910) // extern and dllexport incompatible
93#endif
94VTK_ABI_NAMESPACE_BEGIN
96 extern template class VTKCOMMONCORE_EXPORT vtkImplicitArray, vtkStructuredPointBackend,
98#ifdef _MSC_VER
99#pragma warning(pop)
100#endif
101VTK_ABI_NAMESPACE_END
102#endif // VTK_STRUCTURED_POINT_ARRAY_TEMPLATE_EXTERN
103// The following clause is only for MSVC 2008 and 2010
104#elif defined(_MSC_VER) && !defined(VTK_BUILD_SHARED_LIBS)
105#pragma warning(push)
106// C4091: 'extern ' : ignored on left of 'int' when no variable is declared
107#pragma warning(disable : 4091)
108
109// Compiler-specific extension warning.
110#pragma warning(disable : 4231)
111
112// We need to disable warning 4910 and do an extern dllexport
113// anyway. When deriving new arrays from an
114// instantiation of this template the compiler does an explicit
115// instantiation of the base class. From outside the vtkCommon
116// library we block this using an extern dllimport instantiation.
117// For classes inside vtkCommon we should be able to just do an
118// extern instantiation, but VS 2008 complains about missing
119// definitions. We cannot do an extern dllimport inside vtkCommon
120// since the symbols are local to the dll. An extern dllexport
121// seems to be the only way to convince VS 2008 to do the right
122// thing, so we just disable the warning.
123#pragma warning(disable : 4910) // extern and dllexport incompatible
124
125// Use an "extern explicit instantiation" to give the class a DLL
126// interface. This is a compiler-specific extension.
127VTK_ABI_NAMESPACE_BEGIN
129 extern template class VTKCOMMONCORE_EXPORT vtkImplicitArray, vtkStructuredPointBackend,
131
132#pragma warning(pop)
133
134VTK_ABI_NAMESPACE_END
135#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 >, vtkArrayTypes::VTK_STRUCTURED_POINT_ARRAY > > 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 vtkInstantiateSecondOrderWithParameterTemplateMacro(decl0, decl1, par)
Definition vtkType.h:445
@ VTK_STRUCTURED_POINT_ARRAY
Definition vtkType.h:97
#define vtkExternSecondOrderWithParameterTemplateMacro(decl0, decl1, par)
Definition vtkType.h:495