Commit 6104d8c8 authored by David Gobbi's avatar David Gobbi

Check for IsExcluded in the language wrappers

parent dcacb7a3
......@@ -478,6 +478,7 @@ int checkFunctionSignature(ClassInfo *data)
/* some functions will not get wrapped no matter what else */
if (currentFunction->IsOperator ||
currentFunction->ArrayFailure ||
currentFunction->IsExcluded ||
!currentFunction->IsPublic ||
!currentFunction->Name)
{
......@@ -717,7 +718,9 @@ void outputFunction(FILE *fp, ClassInfo *data)
numberOfWrappedFunctions++;
}
if (currentFunction->IsPublic && args_ok &&
if (!currentFunction->IsExcluded &&
currentFunction->IsPublic &&
args_ok &&
strcmp(data->Name,currentFunction->Name) &&
strcmp(data->Name, currentFunction->Name + 1))
{
......@@ -848,7 +851,8 @@ int main(int argc, char *argv[])
}
/* get the main class */
if ((data = file_info->MainClass) == NULL)
data = file_info->MainClass;
if (data == NULL || data->IsExcluded)
{
fclose(fp);
exit(0);
......
......@@ -315,6 +315,7 @@ int checkFunctionSignature(ClassInfo *data)
/* some functions will not get wrapped no matter what else */
if (currentFunction->IsOperator ||
currentFunction->ArrayFailure ||
currentFunction->IsExcluded ||
!currentFunction->IsPublic ||
!currentFunction->Name)
{
......@@ -510,7 +511,9 @@ void outputFunction(FILE *fp, ClassInfo *data)
args_ok = checkFunctionSignature(data);
if (currentFunction->IsPublic && args_ok &&
if (!currentFunction->IsExcluded &&
currentFunction->IsPublic &&
args_ok &&
strcmp(data->Name,currentFunction->Name) &&
strcmp(data->Name, currentFunction->Name + 1))
{
......@@ -663,7 +666,9 @@ void vtkParseOutput(FILE *fp, FileInfo *file_info)
ClassInfo *data;
int i;
if ((data = file_info->MainClass) == NULL)
/* get the main class */
data = file_info->MainClass;
if (data == NULL || data->IsExcluded)
{
return;
}
......@@ -706,7 +711,10 @@ if (strcmp("vtkObject",data->Name))
for (i = 0; i < data->NumberOfFunctions; i++)
{
currentFunction = data->Functions[i];
outputFunction(fp, data);
if (!currentFunction->IsExcluded)
{
outputFunction(fp, data);
}
}
if (!data->NumberOfSuperClasses)
......
......@@ -799,6 +799,7 @@ int checkFunctionSignature(ClassInfo *data)
/* some functions will not get wrapped no matter what else */
if (currentFunction->IsOperator ||
currentFunction->ArrayFailure ||
currentFunction->IsExcluded ||
!currentFunction->IsPublic ||
!currentFunction->Name)
{
......@@ -1053,7 +1054,9 @@ void outputFunction(FILE *fp, ClassInfo *data)
numberOfWrappedFunctions++;
}
if (currentFunction->IsPublic && args_ok &&
if (!currentFunction->IsExcluded &&
currentFunction->IsPublic &&
args_ok &&
strcmp(data->Name,currentFunction->Name) &&
strcmp(data->Name, currentFunction->Name + 1))
{
......@@ -1252,7 +1255,8 @@ int main(int argc, char *argv[])
}
/* get the main class */
if ((data = file_info->MainClass) == NULL)
data = file_info->MainClass;
if (data == NULL || data->IsExcluded)
{
fclose(fp);
exit(0);
......
......@@ -185,6 +185,7 @@ static void vtkWrapPython_GenerateSpecialHeaders(
{
currentFunction = data->Functions[i];
if (currentFunction->Access == VTK_ACCESS_PUBLIC &&
!currentFunction->IsExcluded &&
strcmp(currentFunction->Class, data->Name) == 0)
{
classname = "void";
......@@ -505,6 +506,11 @@ int main(int argc, char *argv[])
for (i = 0; i < contents->NumberOfClasses; i++)
{
data = contents->Classes[i];
if (data->IsExcluded)
{
continue;
}
is_vtkobject = wrapAsVTKObject[i];
/* if "hinfo" is present, wrap everything, else just the main class */
......
......@@ -649,6 +649,7 @@ int vtkWrapPython_WrapOneClass(
FunctionInfo *func = data->Functions[i];
if (func->Name &&
!func->IsExcluded &&
func->Access == VTK_ACCESS_PUBLIC &&
strcmp("New", func->Name) == 0 &&
func->NumberOfParameters == 0 &&
......@@ -661,7 +662,8 @@ int vtkWrapPython_WrapOneClass(
/* create any enum types defined in the class */
for (i = 0; i < data->NumberOfEnums; i++)
{
if (data->Enums[i]->Access == VTK_ACCESS_PUBLIC)
if (!data->Enums[i]->IsExcluded &&
data->Enums[i]->Access == VTK_ACCESS_PUBLIC)
{
vtkWrapPython_GenerateEnumType(
fp, module, classname, data->Enums[i]);
......
......@@ -61,7 +61,8 @@ void vtkWrapPython_MarkAllEnums(
for (i = 0; i < n; i++)
{
currentFunction = data->Functions[i];
if (currentFunction->Access == VTK_ACCESS_PUBLIC)
if (!currentFunction->IsExcluded &&
currentFunction->Access == VTK_ACCESS_PUBLIC)
{
/* we start with the return value */
val = currentFunction->ReturnValue;
......@@ -239,7 +240,8 @@ void vtkWrapPython_AddPublicEnumTypes(
for (i = 0; i < data->NumberOfEnums; i++)
{
if (data->Enums[i]->Access == VTK_ACCESS_PUBLIC)
if (!data->Enums[i]->IsExcluded &&
data->Enums[i]->Access == VTK_ACCESS_PUBLIC)
{
vtkWrapPython_AddEnumType(
fp, indent, dictvar, objvar, pythonname, data->Enums[i]);
......
......@@ -588,7 +588,8 @@ int vtkWrapPython_MethodCheck(
int i, n;
/* some functions will not get wrapped no matter what */
if (currentFunction->Access != VTK_ACCESS_PUBLIC ||
if (currentFunction->IsExcluded ||
currentFunction->Access != VTK_ACCESS_PUBLIC ||
vtkWrap_IsInheritedMethod(data, currentFunction))
{
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment