/usr/include/vtk-6.3/vtkWrap.h is in libvtk6-dev 6.3.0+dfsg1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkWrap.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* vtkWrap provides useful functions for generating wrapping code.
*/
#ifndef VTK_WRAP_H
#define VTK_WRAP_H
#include "vtkParse.h"
#include "vtkParseHierarchy.h"
/**
* For use with vtkWrap_DeclareVariable.
*/
/*@{*/
#define VTK_WRAP_RETURN 1
#define VTK_WRAP_ARG 2
#define VTK_WRAP_NOSEMI 4
/*@}*/
#ifdef __cplusplus
extern "C" {
#endif
/**
* Check for common types.
* IsPODPointer is for unsized arrays of POD types.
*/
/*@{*/
int vtkWrap_IsVoid(ValueInfo *val);
int vtkWrap_IsVoidFunction(ValueInfo *val);
int vtkWrap_IsVoidPointer(ValueInfo *val);
int vtkWrap_IsCharPointer(ValueInfo *val);
int vtkWrap_IsPODPointer(ValueInfo *val);
int vtkWrap_IsVTKObject(ValueInfo *val);
int vtkWrap_IsSpecialObject(ValueInfo *val);
int vtkWrap_IsPythonObject(ValueInfo *val);
int vtkWrap_IsQtObject(ValueInfo *val);
int vtkWrap_IsQtEnum(ValueInfo *val);
/*@}*/
/**
* The basic types, all are mutually exclusive.
* Note that enums are considered to be objects,
* bool and char are considered to be numeric.
*/
/*@{*/
int vtkWrap_IsObject(ValueInfo *val);
int vtkWrap_IsFunction(ValueInfo *val);
int vtkWrap_IsStream(ValueInfo *val);
int vtkWrap_IsNumeric(ValueInfo *val);
int vtkWrap_IsString(ValueInfo *val);
/*@}*/
/**
* Subcategories of numeric types. In this categorization,
* bool and char are not considered to be integers.
*/
/*@{*/
int vtkWrap_IsBool(ValueInfo *val);
int vtkWrap_IsChar(ValueInfo *val);
int vtkWrap_IsInteger(ValueInfo *val);
int vtkWrap_IsRealNumber(ValueInfo *val);
/*@}*/
/**
* Arrays and pointers. These are mutually exclusive.
* IsPointer() does not include pointers to pointers.
* IsArray() and IsNArray() do not include unsized arrays.
* Arrays of pointers are not included in any of these.
*/
/*@{*/
int vtkWrap_IsScalar(ValueInfo *val);
int vtkWrap_IsPointer(ValueInfo *val);
int vtkWrap_IsArray(ValueInfo *val);
int vtkWrap_IsNArray(ValueInfo *val);
/*@}*/
/**
* Properties that can combine with other properties.
*/
/*@{*/
int vtkWrap_IsNonConstRef(ValueInfo *val);
int vtkWrap_IsConstRef(ValueInfo *val);
int vtkWrap_IsRef(ValueInfo *val);
int vtkWrap_IsConst(ValueInfo *val);
/*@}*/
/**
* Hints.
* NewInstance objects must be freed by the caller.
*/
/*@{*/
int vtkWrap_IsNewInstance(ValueInfo *val);
/*@}*/
/**
* Check whether the class is derived from vtkObjectBase.
* If "hinfo" is NULL, this just checks that the class
* name starts with "vtk".
*/
int vtkWrap_IsVTKObjectBaseType(
HierarchyInfo *hinfo, const char *classname);
/**
* Check if the WRAP_SPECIAL flag is set for the class.
* If "hinfo" is NULL, it defaults to just checking if
* the class starts with "vtk" and returns -1 if so.
*/
int vtkWrap_IsSpecialType(
HierarchyInfo *hinfo, const char *classname);
/**
* Check if the class is derived from superclass.
* If "hinfo" is NULL, then only an exact match to the
* superclass will succeed.
*/
int vtkWrap_IsTypeOf(
HierarchyInfo *hinfo, const char *classname, const char *superclass);
/**
* Check if the type of the value is an enum member of the class.
*/
int vtkWrap_IsEnumMember(ClassInfo *data, ValueInfo *arg);
/**
* Check whether a class is wrapped. If "hinfo" is NULL,
* it just checks that the class starts with "vtk".
*/
int vtkWrap_IsClassWrapped(
HierarchyInfo *hinfo, const char *classname);
/**
* Check whether the destructor is public
*/
int vtkWrap_HasPublicDestructor(ClassInfo *data);
/**
* Check whether the copy constructor is public
*/
int vtkWrap_HasPublicCopyConstructor(ClassInfo *data);
/**
* Expand all typedef types that are used in function arguments.
* This should be done before any wrapping is done, to make sure
* that the wrappers see the real types.
*/
void vtkWrap_ExpandTypedefs(
ClassInfo *data, FileInfo *finfo, HierarchyInfo *hinfo);
/**
* Apply any using declarations that appear in the class.
* If any using declarations appear in the class that refer to superclass
* methods, the superclass header file will be parsed and the used methods
* will be brought into the class.
*/
void vtkWrap_ApplyUsingDeclarations(
ClassInfo *data, FileInfo *finfo, HierarchyInfo *hinfo);
/**
* Apply any hints about array sizes, e.g. hint that the
* GetNumberOfComponents() method gives the tuple size.
*/
void vtkWrap_FindCountHints(
ClassInfo *data, FileInfo *finfo, HierarchyInfo *hinfo);
/**
* Get the size of a fixed-size tuple
*/
int vtkWrap_GetTupleSize(ClassInfo *data, HierarchyInfo *hinfo);
/**
* Apply any hints about methods that return a new object instance,
* i.e. factory methods and the like. Reference counts must be
* handled differently for such returned objects.
*/
void vtkWrap_FindNewInstanceMethods(
ClassInfo *data, HierarchyInfo *hinfo);
/**
* Get the name of a type. The name will not include "const".
*/
const char *vtkWrap_GetTypeName(ValueInfo *val);
/**
* True if the method a constructor of the class.
*/
int vtkWrap_IsConstructor(ClassInfo *c, FunctionInfo *f);
/**
* True if the method a destructor of the class.
*/
int vtkWrap_IsDestructor(ClassInfo *c, FunctionInfo *f);
/**
* Check if a method is from a SetVector method.
*/
int vtkWrap_IsSetVectorMethod(FunctionInfo *f);
/**
* Check if a method is from a GetVector method.
*/
int vtkWrap_IsGetVectorMethod(FunctionInfo *f);
/**
* Count the number of parameters that are wrapped.
* This skips the "void *" parameter that follows
* wrapped function pointer parameters.
*/
int vtkWrap_CountWrappedParameters(FunctionInfo *f);
/**
* Count the number of args that are required.
* This counts to the last argument that does not
* have a default value. Array args are not allowed
* to have default values.
*/
int vtkWrap_CountRequiredArguments(FunctionInfo *f);
/**
* Write a variable declaration to a file.
* Void is automatically ignored, and nothing is written for
* function pointers
* Set "idx" to -1 to avoid writing an idx.
* Set "flags" to VTK_WRAP_RETURN to write a return value,
* or to VTK_WRAP_ARG to write a temp argument variable.
* The following rules apply:
* - if VTK_WRAP_NOSEMI is set, then no semicolon/newline is printed
* - if VTK_WRAP_RETURN is set, then "&" becomes "*"
* - if VTK_WRAP_ARG is set, "&" becomes "*" only for object
* types, and is removed for all other types.
* - "const" is removed except for return values with "&" or "*".
*/
void vtkWrap_DeclareVariable(
FILE *fp, ClassInfo *data, ValueInfo *v, const char *name,
int idx, int flags);
/**
* Write an "int" size variable for arrays, initialized to
* the array size if the size is greater than zero.
* For N-dimensional arrays, write a static array of ints.
*/
void vtkWrap_DeclareVariableSize(
FILE *fp, ValueInfo *v, const char *name, int idx);
/**
* Makes a superclass name into a valid identifier. Returns NULL if the given
* name is valid as-is.
*/
char *vtkWrap_SafeSuperclassName(const char *name);
#ifdef __cplusplus
}
#endif
#endif
|