Restore support for CastXML-based wrappers
ActiViz (C# support) wraps VTK using castxml
which needs code to actually compile in order to extract the information for wrapping. Between 8.1 and 8.2, two major changes were made in VTK related to wrapping:
- move from source file properties for excluding files from wrapping to using
__VTK_WRAP__
to hide classes that should not be wrapped; and - move from external files for "hints" as to array sizes for methods with raw pointers to macros that VTK's wrapping tools understoon.
These were done so that installs of VTK had the same information as was available in the build of VTK itself. However, this basically assumed that vtkWrappingTools
was used. This excluded support for tools like castxml
because a class which is wrapped that included an excluded file basically removed the definition which causes compilation failures.
Instead of reusing __VTK_WRAP__
in order to hide classes, attributes should be added to classes directly. Something like:
class VTK_WRAP_EXCLUDE VTKMODULE_EXPORT vtkExcludedClass
where in a normal build, VTK_WRAP_EXCLUDE
expands to nothing. With __VTK_WRAP__
defined, this should be [[vtk::wrapexclude]]
or the like that can then be checked in VTK's wrappers and ActiViz in order to skip that class.
I suspect that once ActiViz can set __VTK_WRAP__
again, the existing attribute definitions for VTK_SIZEHINT
should suffice for information, but if not, the wrapping tools may need to support writing out the old hints file format like it writes out the hierarchy files.
Here is a list of headers hiding code behind __VTK_WRAP__
. Headers changing base classes in order to hide templates and those hiding individual methods behind __VTK_WRAP__
are excluded.
Header list
Accelerators/Vtkm/vtkmCellSetExplicit.h
Accelerators/Vtkm/vtkmCellSetSingleType.h
Accelerators/Vtkm/vtkmConnectivityExec.h
Common/Core/SMP/OpenMP/vtkAtomic.h.in
Common/Core/SMP/OpenMP/vtkSMPToolsInternal.h.in
Common/Core/SMP/Sequential/vtkAtomic.h.in
Common/Core/vtkDataArrayAccessor.h
Common/Core/vtkDataArrayTupleRange_AOS.h
Common/Core/vtkDataArrayTupleRange_Generic.h
Common/Core/vtkDataArrayValueRange_AOS.h
Common/Core/vtkDataArrayValueRange_Generic.h
Common/Core/vtkLargeInteger.h
Common/Core/vtkOStreamWrapper.h
Common/Core/vtkSMPTools.h
Common/DataModel/vtkDispatcher_Private.h
Common/DataModel/vtkHyperTreeGridEntry.h
Common/DataModel/vtkHyperTreeGridGeometryEntry.h
Common/DataModel/vtkHyperTreeGridGeometryLevelEntry.h
Common/DataModel/vtkHyperTreeGridLevelEntry.h
IO/ADIOS/ADIOSAttribute.h
IO/ADIOS/ADIOSDefs.h
IO/ADIOS/ADIOSReader.h
IO/ADIOS/ADIOSScalar.h
IO/ADIOS/ADIOSUtilities.h
IO/ADIOS/ADIOSVarInfo.h
IO/ADIOS/ADIOSWriter.h
IO/ADIOS/vtkADIOSDirTree.h
IO/ADIOS/vtkADIOSUtilities.h
IO/Exodus/vtkExodusIIReaderPrivate.h
IO/Exodus/vtkExodusIIReaderVariableCheck.h
IO/Import/vtkOBJImporterInternals.h
IO/LSDyna/vtkLSDynaPart.h
IO/LSDyna/vtkLSDynaPartCollection.h
IO/SegY/vtkSegYReaderInternal.h
IO/Xdmf2/vtkXdmfHeavyData.h
IO/Xdmf2/vtkXdmfReaderInternal.h
Parallel/MPI/vtkMPI.h
Rendering/Core/vtkCIEDE2000.h
Rendering/Core/vtkNoise200x200.h
Rendering/LICOpenGL2/vtkLICNoiseHelper.h
Rendering/LICOpenGL2/vtkSurfaceLICHelper.h
Rendering/OpenGL2/vtkCocoaGLView.h
Rendering/OpenGL2/vtkCocoaMacOSXSDKCompatibility.h
Rendering/VolumeOpenGL2/vtkOpenGLTransferFunction2D.h
Rendering/VolumeOpenGL2/vtkOpenGLVolumeGradientOpacityTable.h
Rendering/VolumeOpenGL2/vtkOpenGLVolumeOpacityTable.h
Rendering/VolumeOpenGL2/vtkOpenGLVolumeRGBTable.h
Rendering/VolumeOpenGL2/vtkVolumeInputHelper.h
Testing/Rendering/vtkRegressionTestImage.h