VTK
vtkWrappingHints.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWrappingHints.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
23 #ifndef vtkWrappingHints_h
24 #define vtkWrappingHints_h
25 
26 #ifdef __VTK_WRAP__
27 // The return value points to a newly-created VTK object.
28 #define VTK_NEWINSTANCE [[vtk::newinstance]]
29 // The parameter is a pointer to a zerocopy buffer.
30 #define VTK_ZEROCOPY [[vtk::zerocopy]]
31 // Set preconditions for a function
32 #define VTK_EXPECTS(x) [[vtk::expects(x)]]
33 // Set size hint for parameter or return value
34 #define VTK_SIZEHINT(...) [[vtk::sizehint(__VA_ARGS__)]]
35 #else
36 #define VTK_NEWINSTANCE
37 #define VTK_ZEROCOPY
38 #define VTK_EXPECTS(x)
39 #define VTK_SIZEHINT(...)
40 #endif
41 
42 #endif
43 // VTK-HeaderTest-Exclude: vtkWrappingHints.h