VTK
Functions
vtkWrap.h File Reference
#include "vtkParse.h"
#include "vtkParseHierarchy.h"
Include dependency graph for vtkWrap.h:

Go to the source code of this file.

Macros

#define VTK_WRAP_RETURN   1
 vtkWrap provides useful functions for generating wrapping code. More...
 
#define VTK_WRAP_ARG   2
 vtkWrap provides useful functions for generating wrapping code. More...
 
#define VTK_WRAP_NOSEMI   4
 vtkWrap provides useful functions for generating wrapping code. More...
 

Functions

int vtkWrap_IsVTKObjectBaseType (HierarchyInfo *hinfo, const char *classname)
 Check whether the class is derived from vtkObjectBase. More...
 
int vtkWrap_IsSpecialType (HierarchyInfo *hinfo, const char *classname)
 Check whether the class is not derived from vtkObjectBase. More...
 
int vtkWrap_IsTypeOf (HierarchyInfo *hinfo, const char *classname, const char *superclass)
 Check if the class is derived from superclass. More...
 
int vtkWrap_IsEnumMember (ClassInfo *data, ValueInfo *arg)
 Check if the type of the value is an enum member of the class. More...
 
int vtkWrap_IsClassWrapped (HierarchyInfo *hinfo, const char *classname)
 Check whether a class is wrapped. More...
 
int vtkWrap_HasPublicDestructor (ClassInfo *data)
 Check whether the destructor is public. More...
 
int vtkWrap_HasPublicCopyConstructor (ClassInfo *data)
 Check whether the copy constructor is public. More...
 
void vtkWrap_ExpandTypedefs (ClassInfo *data, FileInfo *finfo, HierarchyInfo *hinfo)
 Expand all typedef types that are used in function arguments. More...
 
void vtkWrap_ApplyUsingDeclarations (ClassInfo *data, FileInfo *finfo, HierarchyInfo *hinfo)
 Apply any using declarations that appear in the class. More...
 
void vtkWrap_FindCountHints (ClassInfo *data, FileInfo *finfo, HierarchyInfo *hinfo)
 Apply any hints about array sizes, e.g. More...
 
int vtkWrap_GetTupleSize (ClassInfo *data, HierarchyInfo *hinfo)
 Get the size of a fixed-size tuple. More...
 
void vtkWrap_FindNewInstanceMethods (ClassInfo *data, HierarchyInfo *hinfo)
 Apply any hints about methods that return a new object instance, i.e. More...
 
const char * vtkWrap_GetTypeName (ValueInfo *val)
 Get the name of a type. More...
 
int vtkWrap_IsConstructor (ClassInfo *c, FunctionInfo *f)
 True if the method a constructor of the class. More...
 
int vtkWrap_IsDestructor (ClassInfo *c, FunctionInfo *f)
 True if the method a destructor of the class. More...
 
int vtkWrap_IsSetVectorMethod (FunctionInfo *f)
 Check if a method is from a SetVector method. More...
 
int vtkWrap_IsGetVectorMethod (FunctionInfo *f)
 Check if a method is from a GetVector method. More...
 
int vtkWrap_CountWrappedParameters (FunctionInfo *f)
 Count the number of parameters that are wrapped. More...
 
int vtkWrap_CountRequiredArguments (FunctionInfo *f)
 Count the number of args that are required. More...
 
void vtkWrap_DeclareVariable (FILE *fp, ClassInfo *data, ValueInfo *v, const char *name, int idx, int flags)
 Write a variable declaration to a file. More...
 
void vtkWrap_DeclareVariableSize (FILE *fp, ValueInfo *v, const char *name, int idx)
 Write an "int" size variable for arrays, initialized to the array size if the size is greater than zero. More...
 
char * vtkWrap_SafeSuperclassName (const char *name)
 Makes a superclass name into a valid identifier. More...
 
int vtkWrap_IsVoid (ValueInfo *val)
 Check for common types. More...
 
int vtkWrap_IsVoidFunction (ValueInfo *val)
 Check for common types. More...
 
int vtkWrap_IsVoidPointer (ValueInfo *val)
 Check for common types. More...
 
int vtkWrap_IsCharPointer (ValueInfo *val)
 Check for common types. More...
 
int vtkWrap_IsPODPointer (ValueInfo *val)
 Check for common types. More...
 
int vtkWrap_IsVTKObject (ValueInfo *val)
 Check for common types. More...
 
int vtkWrap_IsSpecialObject (ValueInfo *val)
 Check for common types. More...
 
int vtkWrap_IsPythonObject (ValueInfo *val)
 Check for common types. More...
 
int vtkWrap_IsQtObject (ValueInfo *val)
 Check for common types. More...
 
int vtkWrap_IsQtEnum (ValueInfo *val)
 Check for common types. More...
 
int vtkWrap_IsObject (ValueInfo *val)
 The basic types, all are mutually exclusive. More...
 
int vtkWrap_IsFunction (ValueInfo *val)
 The basic types, all are mutually exclusive. More...
 
int vtkWrap_IsStream (ValueInfo *val)
 The basic types, all are mutually exclusive. More...
 
int vtkWrap_IsNumeric (ValueInfo *val)
 The basic types, all are mutually exclusive. More...
 
int vtkWrap_IsString (ValueInfo *val)
 The basic types, all are mutually exclusive. More...
 
int vtkWrap_IsBool (ValueInfo *val)
 Subcategories of numeric types. More...
 
int vtkWrap_IsChar (ValueInfo *val)
 Subcategories of numeric types. More...
 
int vtkWrap_IsInteger (ValueInfo *val)
 Subcategories of numeric types. More...
 
int vtkWrap_IsRealNumber (ValueInfo *val)
 Subcategories of numeric types. More...
 
int vtkWrap_IsScalar (ValueInfo *val)
 Arrays and pointers. More...
 
int vtkWrap_IsPointer (ValueInfo *val)
 Arrays and pointers. More...
 
int vtkWrap_IsArray (ValueInfo *val)
 Arrays and pointers. More...
 
int vtkWrap_IsNArray (ValueInfo *val)
 Arrays and pointers. More...
 
int vtkWrap_IsNonConstRef (ValueInfo *val)
 Properties that can combine with other properties. More...
 
int vtkWrap_IsConstRef (ValueInfo *val)
 Properties that can combine with other properties. More...
 
int vtkWrap_IsRef (ValueInfo *val)
 Properties that can combine with other properties. More...
 
int vtkWrap_IsConst (ValueInfo *val)
 Properties that can combine with other properties. More...
 
int vtkWrap_IsNewInstance (ValueInfo *val)
 Hints. More...
 

Macro Definition Documentation

#define VTK_WRAP_RETURN   1

vtkWrap provides useful functions for generating wrapping code.

For use with vtkWrap_DeclareVariable.

Definition at line 30 of file vtkWrap.h.

#define VTK_WRAP_ARG   2

vtkWrap provides useful functions for generating wrapping code.

For use with vtkWrap_DeclareVariable.

Definition at line 31 of file vtkWrap.h.

#define VTK_WRAP_NOSEMI   4

vtkWrap provides useful functions for generating wrapping code.

For use with vtkWrap_DeclareVariable.

Definition at line 32 of file vtkWrap.h.

Function Documentation

int vtkWrap_IsVoid ( ValueInfo val)

Check for common types.

IsPODPointer is for unsized arrays of POD types.

int vtkWrap_IsVoidFunction ( ValueInfo val)

Check for common types.

IsPODPointer is for unsized arrays of POD types.

int vtkWrap_IsVoidPointer ( ValueInfo val)

Check for common types.

IsPODPointer is for unsized arrays of POD types.

int vtkWrap_IsCharPointer ( ValueInfo val)

Check for common types.

IsPODPointer is for unsized arrays of POD types.

int vtkWrap_IsPODPointer ( ValueInfo val)

Check for common types.

IsPODPointer is for unsized arrays of POD types.

int vtkWrap_IsVTKObject ( ValueInfo val)

Check for common types.

IsPODPointer is for unsized arrays of POD types.

int vtkWrap_IsSpecialObject ( ValueInfo val)

Check for common types.

IsPODPointer is for unsized arrays of POD types.

int vtkWrap_IsPythonObject ( ValueInfo val)

Check for common types.

IsPODPointer is for unsized arrays of POD types.

int vtkWrap_IsQtObject ( ValueInfo val)

Check for common types.

IsPODPointer is for unsized arrays of POD types.

int vtkWrap_IsQtEnum ( ValueInfo val)

Check for common types.

IsPODPointer is for unsized arrays of POD types.

int vtkWrap_IsObject ( 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_IsFunction ( 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_IsStream ( 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_IsNumeric ( 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_IsString ( 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_IsBool ( ValueInfo val)

Subcategories of numeric types.

In this categorization, bool and char are not considered to be integers.

int vtkWrap_IsChar ( ValueInfo val)

Subcategories of numeric types.

In this categorization, bool and char are not considered to be integers.

int vtkWrap_IsInteger ( ValueInfo val)

Subcategories of numeric types.

In this categorization, bool and char are not considered to be integers.

int vtkWrap_IsRealNumber ( ValueInfo val)

Subcategories of numeric types.

In this categorization, bool and char are not considered to be integers.

int vtkWrap_IsScalar ( 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_IsPointer ( 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_IsArray ( 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_IsNArray ( 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_IsNonConstRef ( ValueInfo val)

Properties that can combine with other properties.

int vtkWrap_IsConstRef ( ValueInfo val)

Properties that can combine with other properties.

int vtkWrap_IsRef ( ValueInfo val)

Properties that can combine with other properties.

int vtkWrap_IsConst ( ValueInfo val)

Properties that can combine with other properties.

int vtkWrap_IsNewInstance ( ValueInfo val)

Hints.

NewInstance objects must be freed by the caller.

int vtkWrap_IsVTKObjectBaseType ( HierarchyInfo hinfo,
const char *  classname 
)

Check whether the class is derived from vtkObjectBase.

If "hinfo" is NULL, this just checks that the class name starts with "vtk".

int vtkWrap_IsSpecialType ( HierarchyInfo hinfo,
const char *  classname 
)

Check whether the class is not derived from vtkObjectBase.

If "hinfo" is NULL, it defaults to just checking if the class starts with "vtk" and returns -1 if so.

int vtkWrap_IsTypeOf ( HierarchyInfo hinfo,
const char *  classname,
const char *  superclass 
)

Check if the class is derived from superclass.

If "hinfo" is NULL, then only an exact match to the superclass will succeed.

int vtkWrap_IsEnumMember ( ClassInfo data,
ValueInfo arg 
)

Check if the type of the value is an enum member of the class.

int vtkWrap_IsClassWrapped ( HierarchyInfo hinfo,
const char *  classname 
)

Check whether a class is wrapped.

If "hinfo" is NULL, it just checks that the class starts with "vtk".

int vtkWrap_HasPublicDestructor ( ClassInfo data)

Check whether the destructor is public.

int vtkWrap_HasPublicCopyConstructor ( ClassInfo data)

Check whether the copy constructor is public.

void vtkWrap_ExpandTypedefs ( ClassInfo data,
FileInfo finfo,
HierarchyInfo hinfo 
)

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_ApplyUsingDeclarations ( 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_FindCountHints ( ClassInfo data,
FileInfo finfo,
HierarchyInfo hinfo 
)

Apply any hints about array sizes, e.g.

hint that the GetNumberOfComponents() method gives the tuple size.

int vtkWrap_GetTupleSize ( ClassInfo data,
HierarchyInfo hinfo 
)

Get the size of a fixed-size tuple.

void vtkWrap_FindNewInstanceMethods ( 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.

const char* vtkWrap_GetTypeName ( ValueInfo val)

Get the name of a type.

The name will not include "const".

int vtkWrap_IsConstructor ( ClassInfo c,
FunctionInfo f 
)

True if the method a constructor of the class.

int vtkWrap_IsDestructor ( ClassInfo c,
FunctionInfo f 
)

True if the method a destructor of the class.

int vtkWrap_IsSetVectorMethod ( FunctionInfo f)

Check if a method is from a SetVector method.

int vtkWrap_IsGetVectorMethod ( FunctionInfo f)

Check if a method is from a GetVector method.

int vtkWrap_CountWrappedParameters ( FunctionInfo f)

Count the number of parameters that are wrapped.

This skips the "void *" parameter that follows wrapped function pointer parameters.

int vtkWrap_CountRequiredArguments ( 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.

void vtkWrap_DeclareVariable ( FILE *  fp,
ClassInfo data,
ValueInfo v,
const char *  name,
int  idx,
int  flags 
)

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_DeclareVariableSize ( FILE *  fp,
ValueInfo v,
const char *  name,
int  idx 
)

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.

char* vtkWrap_SafeSuperclassName ( const char *  name)

Makes a superclass name into a valid identifier.

Returns NULL if the given name is valid as-is.