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