VTK  9.3.20240423
vtkWrappingHints.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
11#ifndef vtkWrappingHints_h
12#define vtkWrappingHints_h
13
14#ifdef __VTK_WRAP__
15#define VTK_WRAP_HINTS_DEFINED
16// Exclude a method or class from wrapping
17#define VTK_WRAPEXCLUDE [[vtk::wrapexclude]]
18// The return value points to a newly-created VTK object.
19#define VTK_NEWINSTANCE [[vtk::newinstance]]
20// The parameter is a pointer to a zerocopy buffer.
21#define VTK_ZEROCOPY [[vtk::zerocopy]]
22// The parameter is a path on the filesystem.
23#define VTK_FILEPATH [[vtk::filepath]]
24// Set preconditions for a function
25#define VTK_EXPECTS(x) [[vtk::expects(x)]]
26// Set size hint for parameter or return value
27#define VTK_SIZEHINT(...) [[vtk::sizehint(__VA_ARGS__)]]
28// Opt-in a class for automatic code generation of (de)serializers.
29#define VTK_MARSHALAUTO [[vtk::marshalauto]]
30// Specifies that a class has hand written (de)serializers.
31#define VTK_MARSHALMANUAL [[vtk::marshalmanual]]
32// Excludes a function from the auto-generated (de)serialization process.
33#define VTK_MARSHALEXCLUDE(reason) [[vtk::marshalexclude(reason)]]
34// Enforces a function as the getter for `property`
35#define VTK_MARSHALGETTER(property) [[vtk::marshalgetter(#property)]]
36// Enforces a function as the setter for `property`
37#define VTK_MARSHALSETTER(property) [[vtk::marshalsetter(#property)]]
38#endif
39
40#ifndef VTK_WRAP_HINTS_DEFINED
41#define VTK_WRAPEXCLUDE
42#define VTK_NEWINSTANCE
43#define VTK_ZEROCOPY
44#define VTK_FILEPATH
45#define VTK_EXPECTS(x)
46#define VTK_SIZEHINT(...)
47#define VTK_MARSHALAUTO
48#define VTK_MARSHALMANUAL
49#define VTK_MARSHALEXCLUDE(reason)
50#define VTK_MARSHALGETTER(property)
51#define VTK_MARSHALSETTER(property)
52#endif
53
54#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL "is internal"
55#define VTK_MARSHAL_EXCLUDE_REASON_NOT_SUPPORTED \
56 "(de)serialization is not supported for this type of property"
57
58#endif
59// VTK-HeaderTest-Exclude: vtkWrappingHints.h