VTK  9.5.2
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// Tell wrappers not to associate this method with any property.
19#define VTK_PROPEXCLUDE [[vtk::propexclude]]
20// The return value points to a newly-created VTK object.
21#define VTK_NEWINSTANCE [[vtk::newinstance]]
22// The parameter is a pointer to a zerocopy buffer.
23#define VTK_ZEROCOPY [[vtk::zerocopy]]
24// The parameter is a path on the filesystem.
25#define VTK_FILEPATH [[vtk::filepath]]
26// Release Python GIL for the duration of the call
27#define VTK_UNBLOCKTHREADS [[vtk::unblockthreads]]
28// Set preconditions for a function
29#define VTK_EXPECTS(x) [[vtk::expects(x)]]
30// Set size hint for parameter or return value
31#define VTK_SIZEHINT(...) [[vtk::sizehint(__VA_ARGS__)]]
32// Opt-in a class for automatic code generation of (de)serializers.
33#define VTK_MARSHALAUTO [[vtk::marshalauto]]
34// Specifies that a class has hand written (de)serializers.
35#define VTK_MARSHALMANUAL [[vtk::marshalmanual]]
36// Excludes a function from the auto-generated (de)serialization process.
37#define VTK_MARSHALEXCLUDE(reason) [[vtk::marshalexclude(reason)]]
38// Enforces a function as the getter for `property`
39#define VTK_MARSHALGETTER(property) [[vtk::marshalgetter(#property)]]
40// Enforces a function as the setter for `property`
41#define VTK_MARSHALSETTER(property) [[vtk::marshalsetter(#property)]]
42#endif
43
44#ifndef VTK_WRAP_HINTS_DEFINED
45#define VTK_WRAPEXCLUDE
46#define VTK_PROPEXCLUDE
47#define VTK_NEWINSTANCE
48#define VTK_ZEROCOPY
49#define VTK_FILEPATH
50#define VTK_UNBLOCKTHREADS
51#define VTK_EXPECTS(x)
52#define VTK_SIZEHINT(...)
53#define VTK_MARSHALAUTO
54#define VTK_MARSHALMANUAL
55#define VTK_MARSHALEXCLUDE(reason)
56#define VTK_MARSHALGETTER(property)
57#define VTK_MARSHALSETTER(property)
58#endif
59
60#define VTK_MARSHAL_EXCLUDE_REASON_IS_REDUNDANT "is redundant"
61#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL "is internal"
62#define VTK_MARSHAL_EXCLUDE_REASON_NOT_SUPPORTED \
63 "(de)serialization is not supported for this type of property"
64
65#endif
66// VTK-HeaderTest-Exclude: vtkWrappingHints.h