Back to index

salome-paravis  6.5.0
Functions
vtkParseInternal.h File Reference
#include "vtkParse.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const char * vtkParse_DuplicateString (const char *cp, size_t n)
 Make a persistent copy of a string for use with AddStringToArray: At most 'n' chars will be copied, and the string will be terminated.
void vtkParse_AddStringToArray (const char ***valueArray, int *count, const char *value)
 Add a string to an array of strings, grow array as necessary.
void vtkParse_AddItemToArray (ItemInfo **valueArray, int *count, parse_item_t type, int idx)
 Expand the Item array for classes and namespaces.
void vtkParse_AddDefaultConstructors (ClassInfo *data)
 Add default constructors if they do not already exist.
unsigned int vtkParse_MapType (int vtktype)
 Simple utility for mapping VTK types to VTK_PARSE types.
void vtkParse_SetIgnoreBTX (int option)
 Ignore BTX/ETX markers.
void vtkParse_InitFile (FileInfo *file_info)
 Initializer methods.
void vtkParse_InitNamespace (NamespaceInfo *namespace_info)
void vtkParse_InitClass (ClassInfo *cls)
void vtkParse_InitFunction (FunctionInfo *func)
void vtkParse_InitValue (ValueInfo *val)
void vtkParse_InitEnum (EnumInfo *item)
void vtkParse_InitUsing (UsingInfo *item)
void vtkParse_InitTemplateArgs (TemplateArgs *arg)
void vtkParse_InitTemplateArg (TemplateArg *arg)
void vtkParse_CopyNamespace (NamespaceInfo *data, const NamespaceInfo *orig)
 Copy methods.
void vtkParse_CopyClass (ClassInfo *data, const ClassInfo *orig)
void vtkParse_CopyFunction (FunctionInfo *data, const FunctionInfo *orig)
void vtkParse_CopyValue (ValueInfo *data, const ValueInfo *orig)
void vtkParse_CopyEnum (EnumInfo *data, const EnumInfo *orig)
void vtkParse_CopyUsing (UsingInfo *data, const UsingInfo *orig)
void vtkParse_CopyTemplateArgs (TemplateArgs *data, const TemplateArgs *orig)
void vtkParse_CopyTemplateArg (TemplateArg *data, const TemplateArg *orig)
void vtkParse_FreeFile (FileInfo *file_info)
 Free methods.
void vtkParse_FreeNamespace (NamespaceInfo *namespace_info)
void vtkParse_FreeClass (ClassInfo *cls)
void vtkParse_FreeFunction (FunctionInfo *func)
void vtkParse_FreeValue (ValueInfo *val)
void vtkParse_FreeEnum (EnumInfo *item)
void vtkParse_FreeUsing (UsingInfo *item)
void vtkParse_FreeTemplateArgs (TemplateArgs *arg)
void vtkParse_FreeTemplateArg (TemplateArg *arg)
void vtkParse_AddClassToClass (ClassInfo *info, ClassInfo *item)
 Add various items to the structs.
void vtkParse_AddFunctionToClass (ClassInfo *info, FunctionInfo *item)
void vtkParse_AddEnumToClass (ClassInfo *info, EnumInfo *item)
void vtkParse_AddConstantToClass (ClassInfo *info, ValueInfo *item)
void vtkParse_AddVariableToClass (ClassInfo *info, ValueInfo *item)
void vtkParse_AddTypedefToClass (ClassInfo *info, ValueInfo *item)
void vtkParse_AddUsingToClass (ClassInfo *info, UsingInfo *item)
void vtkParse_AddNamespaceToNamespace (NamespaceInfo *info, NamespaceInfo *item)
void vtkParse_AddClassToNamespace (NamespaceInfo *info, ClassInfo *item)
void vtkParse_AddFunctionToNamespace (NamespaceInfo *info, FunctionInfo *item)
void vtkParse_AddEnumToNamespace (NamespaceInfo *info, EnumInfo *item)
void vtkParse_AddConstantToNamespace (NamespaceInfo *info, ValueInfo *item)
void vtkParse_AddVariableToNamespace (NamespaceInfo *info, ValueInfo *item)
void vtkParse_AddTypedefToNamespace (NamespaceInfo *info, ValueInfo *item)
void vtkParse_AddUsingToNamespace (NamespaceInfo *info, UsingInfo *item)
void vtkParse_AddArgumentToFunction (FunctionInfo *info, ValueInfo *item)
void vtkParse_AddArgumentToTemplate (TemplateArgs *info, TemplateArg *item)

Function Documentation

void vtkParse_AddArgumentToFunction ( FunctionInfo *  info,
ValueInfo *  item 
)

Definition at line 10088 of file vtkParse.tab.c.

{
  info->Arguments = (ValueInfo **)array_size_check(
    info->Arguments, sizeof(ValueInfo *), info->NumberOfArguments);
  info->Arguments[info->NumberOfArguments++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddArgumentToTemplate ( TemplateArgs *  info,
TemplateArg *  item 
)

Definition at line 10097 of file vtkParse.tab.c.

{
  info->Arguments = (TemplateArg **)array_size_check(
    info->Arguments, sizeof(TemplateArg *), info->NumberOfArguments);
  info->Arguments[info->NumberOfArguments++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddClassToClass ( ClassInfo *  info,
ClassInfo *  item 
)

Add various items to the structs.

Definition at line 9936 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfClasses);
  info->Classes = (ClassInfo **)array_size_check(
    info->Classes, sizeof(ClassInfo *), info->NumberOfClasses);
  info->Classes[info->NumberOfClasses++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddClassToNamespace ( NamespaceInfo *  info,
ClassInfo *  item 
)

Definition at line 10017 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfClasses);
  info->Classes = (ClassInfo **)array_size_check(
    info->Classes, sizeof(ClassInfo *), info->NumberOfClasses);
  info->Classes[info->NumberOfClasses++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddConstantToClass ( ClassInfo *  info,
ValueInfo *  item 
)

Definition at line 9966 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfConstants);
  info->Constants = (ValueInfo **)array_size_check(
    info->Constants, sizeof(ValueInfo *), info->NumberOfConstants);
  info->Constants[info->NumberOfConstants++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddConstantToNamespace ( NamespaceInfo *  info,
ValueInfo *  item 
)

Definition at line 10047 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfConstants);
  info->Constants = (ValueInfo **)array_size_check(
    info->Constants, sizeof(ValueInfo *), info->NumberOfConstants);
  info->Constants[info->NumberOfConstants++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddDefaultConstructors ( ClassInfo *  data)

Add default constructors if they do not already exist.

Definition at line 10128 of file vtkParse.tab.c.

{
  FunctionInfo *func;
  ValueInfo *arg;
  size_t k;
  int i, n;
  int default_constructor = 1;
  int copy_constructor = 1;
  char *tname;
  const char *ccname;

  if (cls == NULL || cls->Name == NULL)
    {
    return;
    }

  n = cls->NumberOfFunctions;
  for (i = 0; i < n; i++)
    {
    func = cls->Functions[i];
    if (func->Name && strcmp(func->Name, cls->Name) == 0)
      {
      default_constructor = 0;

      if (func->NumberOfArguments == 1)
        {
        arg = func->Arguments[0];
        if (arg->Class &&
            strcmp(arg->Class, cls->Name) == 0 &&
            (arg->Type & VTK_PARSE_POINTER_MASK) == 0)
          {
          copy_constructor = 0;
          }
        }
      }
    }

  if (default_constructor)
    {
    func = (FunctionInfo *)malloc(sizeof(FunctionInfo));
    vtkParse_InitFunction(func);
    func->Class = vtkstrdup(cls->Name);
    func->Name = vtkstrdup(cls->Name);
    func->Signature = vtkstrcat(cls->Name, "()");
    vtkParse_AddFunctionToClass(cls, func);
    }

  if (copy_constructor)
    {
    if (cls->Template)
      {
      /* specialize the name */
      n = cls->Template->NumberOfArguments;

      k = strlen(cls->Name) + 2;
      for (i = 0; i < n; i++)
        {
        k += strlen(cls->Template->Arguments[i]->Name) + 2;
        }
      tname = vtkstralloc(k);
      strcpy(tname, cls->Name);
      k = strlen(tname);
      tname[k++] = '<';
      for (i = 0; i < n; i++)
        {
        strcpy(&tname[k], cls->Template->Arguments[i]->Name);
        k += strlen(cls->Template->Arguments[i]->Name);
        if (i+1 < n)
          {
          tname[k++] = ',';
          tname[k++] = ' ';
          }
        }
      tname[k++] = '>';
      tname[k] = '\0';
      ccname = tname;
      }
    else
      {
      ccname = vtkstrdup(cls->Name);
      }

    func = (FunctionInfo *)malloc(sizeof(FunctionInfo));
    vtkParse_InitFunction(func);
    func->Class = vtkstrdup(cls->Name);
    func->Name = vtkstrdup(cls->Name);
    func->Signature = vtkstrcat4(cls->Name, "(const &", ccname, ")");
    arg = (ValueInfo *)malloc(sizeof(ValueInfo));
    vtkParse_InitValue(arg);
    arg->Type = (VTK_PARSE_OBJECT_REF | VTK_PARSE_CONST);
    arg->Class = ccname;
    vtkParse_AddArgumentToFunction(func, arg);
    vtkParse_AddFunctionToClass(cls, func);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddEnumToClass ( ClassInfo *  info,
EnumInfo *  item 
)

Definition at line 9956 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfEnums);
  info->Enums = (EnumInfo **)array_size_check(
    info->Enums, sizeof(EnumInfo *), info->NumberOfEnums);
  info->Enums[info->NumberOfEnums++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddEnumToNamespace ( NamespaceInfo *  info,
EnumInfo *  item 
)

Definition at line 10037 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfEnums);
  info->Enums = (EnumInfo **)array_size_check(
    info->Enums, sizeof(EnumInfo *), info->NumberOfEnums);
  info->Enums[info->NumberOfEnums++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddFunctionToClass ( ClassInfo *  info,
FunctionInfo *  item 
)

Definition at line 9946 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfFunctions);
  info->Functions = (FunctionInfo **)array_size_check(
    info->Functions, sizeof(FunctionInfo *), info->NumberOfFunctions);
  info->Functions[info->NumberOfFunctions++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddFunctionToNamespace ( NamespaceInfo *  info,
FunctionInfo *  item 
)

Definition at line 10027 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfFunctions);
  info->Functions = (FunctionInfo **)array_size_check(
    info->Functions, sizeof(FunctionInfo *), info->NumberOfFunctions);
  info->Functions[info->NumberOfFunctions++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddItemToArray ( ItemInfo **  valueArray,
int *  count,
parse_item_t  type,
int  idx 
)

Expand the Item array for classes and namespaces.

Definition at line 9920 of file vtkParse.tab.c.

{
  size_t n = *count;
  ItemInfo *values = *valueArray;

  values = (ItemInfo *)array_size_check(values, sizeof(ItemInfo), n);

  values[n].Type = type;
  values[n].Index = idx;
  *count = n+1;
  *valueArray = values;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddNamespaceToNamespace ( NamespaceInfo *  info,
NamespaceInfo *  item 
)

Definition at line 10007 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfNamespaces);
  info->Namespaces = (NamespaceInfo **)array_size_check(
    info->Namespaces, sizeof(NamespaceInfo *), info->NumberOfNamespaces);
  info->Namespaces[info->NumberOfNamespaces++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddStringToArray ( const char ***  valueArray,
int *  count,
const char *  value 
)

Add a string to an array of strings, grow array as necessary.

Definition at line 10106 of file vtkParse.tab.c.

{
  *valueArray = (const char **)array_size_check(
    (char **)*valueArray, sizeof(const char *), *count);

  (*valueArray)[(*count)++] = value;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddTypedefToClass ( ClassInfo *  info,
ValueInfo *  item 
)

Definition at line 9986 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfTypedefs);
  info->Typedefs = (ValueInfo **)array_size_check(
    info->Typedefs, sizeof(ValueInfo *), info->NumberOfTypedefs);
  info->Typedefs[info->NumberOfTypedefs++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddTypedefToNamespace ( NamespaceInfo *  info,
ValueInfo *  item 
)

Definition at line 10067 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfTypedefs);
  info->Typedefs = (ValueInfo **)array_size_check(
    info->Typedefs, sizeof(ValueInfo *), info->NumberOfTypedefs);
  info->Typedefs[info->NumberOfTypedefs++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddUsingToClass ( ClassInfo *  info,
UsingInfo *  item 
)

Definition at line 9996 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfUsings);
  info->Usings = (UsingInfo **)array_size_check(
    info->Usings, sizeof(UsingInfo *), info->NumberOfUsings);
  info->Usings[info->NumberOfUsings++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddUsingToNamespace ( NamespaceInfo *  info,
UsingInfo *  item 
)

Definition at line 10077 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfUsings);
  info->Usings = (UsingInfo **)array_size_check(
    info->Usings, sizeof(UsingInfo *), info->NumberOfUsings);
  info->Usings[info->NumberOfUsings++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddVariableToClass ( ClassInfo *  info,
ValueInfo *  item 
)

Definition at line 9976 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfVariables);
  info->Variables = (ValueInfo **)array_size_check(
    info->Variables, sizeof(ValueInfo *), info->NumberOfVariables);
  info->Variables[info->NumberOfVariables++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_AddVariableToNamespace ( NamespaceInfo *  info,
ValueInfo *  item 
)

Definition at line 10057 of file vtkParse.tab.c.

{
  vtkParse_AddItemToArray(&info->Items, &info->NumberOfItems,
    item->ItemType, info->NumberOfVariables);
  info->Variables = (ValueInfo **)array_size_check(
    info->Variables, sizeof(ValueInfo *), info->NumberOfVariables);
  info->Variables[info->NumberOfVariables++] = item;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_CopyClass ( ClassInfo *  data,
const ClassInfo *  orig 
)

Definition at line 8556 of file vtkParse.tab.c.

{
  unsigned long i, n;

  cls->ItemType = orig->ItemType;
  cls->Access = orig->Access;
  cls->Name = orig->Name;
  cls->Comment = orig->Comment;
  cls->Template = NULL;

  if (orig->Template)
    {
    cls->Template = (TemplateArgs *)malloc(sizeof(TemplateArgs));
    vtkParse_CopyTemplateArgs(cls->Template, orig->Template);
    }

  n = orig->NumberOfSuperClasses;
  cls->NumberOfSuperClasses = n;
  if (n)
    {
    cls->SuperClasses = (const char **)malloc(n*sizeof(char *));
    for (i = 0; i < n; i++)
      {
      cls->SuperClasses[i] = orig->SuperClasses[i];
      }
    }

  n = orig->NumberOfItems;
  cls->NumberOfItems = n;
  if (n)
    {
    cls->Items = (ItemInfo *)malloc(n*sizeof(ItemInfo));
    for (i = 0; i < n; i++)
      {
      cls->Items[i].Type = orig->Items[i].Type;
      cls->Items[i].Index = orig->Items[i].Index;
      }
    }

  n = orig->NumberOfClasses;
  cls->NumberOfClasses = n;
  if (n)
    {
    cls->Classes = (ClassInfo **)malloc(n*sizeof(ClassInfo *));
    for (i = 0; i < n; i++)
      {
      cls->Classes[i] = (ClassInfo *)malloc(sizeof(ClassInfo));
      vtkParse_CopyClass(cls->Classes[i], orig->Classes[i]);
      }
    }

  n = orig->NumberOfFunctions;
  cls->NumberOfFunctions = n;
  if (n)
    {
    cls->Functions = (FunctionInfo **)malloc(n*sizeof(FunctionInfo *));
    for (i = 0; i < n; i++)
      {
      cls->Functions[i] = (FunctionInfo *)malloc(sizeof(FunctionInfo));
      vtkParse_CopyFunction(cls->Functions[i], orig->Functions[i]);
      }
    }

  n = orig->NumberOfConstants;
  cls->NumberOfConstants = n;
  if (n)
    {
    cls->Constants = (ValueInfo **)malloc(n*sizeof(ValueInfo *));
    for (i = 0; i < n; i++)
      {
      cls->Constants[i] = (ValueInfo *)malloc(sizeof(ValueInfo));
      vtkParse_CopyValue(cls->Constants[i], orig->Constants[i]);
      }
    }

  n = orig->NumberOfVariables;
  cls->NumberOfVariables = n;
  if (n)
    {
    cls->Variables = (ValueInfo **)malloc(n*sizeof(ValueInfo *));
    for (i = 0; i < n; i++)
      {
      cls->Variables[i] = (ValueInfo *)malloc(sizeof(ValueInfo));
      vtkParse_CopyValue(cls->Variables[i], orig->Variables[i]);
      }
    }

  n = orig->NumberOfEnums;
  cls->NumberOfEnums = n;
  if (n)
    {
    cls->Enums = (EnumInfo **)malloc(n*sizeof(EnumInfo *));
    for (i = 0; i < n; i++)
      {
      cls->Enums[i] = (EnumInfo *)malloc(sizeof(EnumInfo));
      vtkParse_CopyEnum(cls->Enums[i], orig->Enums[i]);
      }
    }

  n = orig->NumberOfTypedefs;
  cls->NumberOfTypedefs = n;
  if (n)
    {
    cls->Typedefs = (ValueInfo **)malloc(n*sizeof(ValueInfo *));
    for (i = 0; i < n; i++)
      {
      cls->Typedefs[i] = (ValueInfo *)malloc(sizeof(ValueInfo));
      vtkParse_CopyValue(cls->Typedefs[i], orig->Typedefs[i]);
      }
    }

  n = orig->NumberOfUsings;
  cls->NumberOfUsings = n;
  if (n)
    {
    cls->Usings = (UsingInfo **)malloc(n*sizeof(UsingInfo *));
    for (i = 0; i < n; i++)
      {
      cls->Usings[i] = (UsingInfo *)malloc(sizeof(UsingInfo));
      vtkParse_CopyUsing(cls->Usings[i], orig->Usings[i]);
      }
    }

  cls->IsAbstract = orig->IsAbstract;
  cls->HasDelete = orig->HasDelete;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_CopyEnum ( EnumInfo *  data,
const EnumInfo *  orig 
)

Definition at line 8508 of file vtkParse.tab.c.

{
  item->ItemType = orig->ItemType;
  item->Access = orig->Access;
  item->Name = orig->Name;
  item->Comment = orig->Comment;
}

Here is the caller graph for this function:

void vtkParse_CopyFunction ( FunctionInfo *  data,
const FunctionInfo *  orig 
)

Definition at line 8379 of file vtkParse.tab.c.

{
  unsigned long i, n;

  func->ItemType = orig->ItemType;
  func->Access = orig->Access;
  func->Name = orig->Name;
  func->Comment = orig->Comment;
  func->Class = orig->Class;
  func->Signature = orig->Signature;
  func->Template = NULL;

  if (orig->Template)
    {
    func->Template = (TemplateArgs *)malloc(sizeof(TemplateArgs));
    vtkParse_CopyTemplateArgs(func->Template, orig->Template);
    }

  n = orig->NumberOfArguments;
  func->NumberOfArguments = n;
  if (n)
    {
    func->Arguments = (ValueInfo **)malloc(n*sizeof(ValueInfo *));
    for (i = 0; i < n; i++)
      {
      func->Arguments[i] = (ValueInfo *)malloc(sizeof(ValueInfo));
      vtkParse_CopyValue(func->Arguments[i], orig->Arguments[i]);
      }
    }

  func->ReturnValue = NULL;
  if (orig->ReturnValue)
    {
    func->ReturnValue = (ValueInfo *)malloc(sizeof(ValueInfo));
    vtkParse_CopyValue(func->ReturnValue, orig->ReturnValue);
    }

  func->Macro = orig->Macro;
  func->SizeHint = orig->SizeHint;
  func->IsStatic = orig->IsStatic;
  func->IsVirtual = orig->IsVirtual;
  func->IsPureVirtual = orig->IsPureVirtual;
  func->IsOperator = orig->IsOperator;
  func->IsVariadic = orig->IsVariadic;
  func->IsConst = orig->IsConst;
  func->IsExplicit = orig->IsExplicit;

  /* everything below here is legacy information, *
   * maintained only for backwards compatibility  */
  func->ReturnType = orig->ReturnType;
  func->ReturnClass = orig->ReturnClass;
  func->HaveHint = orig->HaveHint;
  func->HintSize = orig->HintSize;
  func->IsLegacy = orig->IsLegacy;
  func->ArrayFailure = orig->ArrayFailure;
  func->IsPublic = orig->IsPublic;
  func->IsProtected = orig->IsProtected;

  for (i = 0; i < MAX_ARGS; i++)
    {
    func->ArgTypes[i] = orig->ArgTypes[i];
    func->ArgClasses[i] = orig->ArgClasses[i];
    func->ArgCounts[i] = orig->ArgCounts[i];
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_CopyNamespace ( NamespaceInfo *  data,
const NamespaceInfo *  orig 
)

Copy methods.

Definition at line 8703 of file vtkParse.tab.c.

{
  unsigned long i, n;

  /* namespace info */
  ninfo->ItemType = orig->ItemType;
  ninfo->Access = orig->Access;
  ninfo->Name = orig->Name;
  ninfo->Comment = orig->Comment;

  n = orig->NumberOfItems;
  ninfo->NumberOfItems = n;
  if (n)
    {
    ninfo->Items = (ItemInfo *)malloc(n*sizeof(ItemInfo));
    for (i = 0; i < n; i++)
      {
      ninfo->Items[i].Type = orig->Items[i].Type;
      ninfo->Items[i].Index = orig->Items[i].Index;
      }
    }

  n = orig->NumberOfClasses;
  ninfo->NumberOfClasses = n;
  if (n)
    {
    ninfo->Classes = (ClassInfo **)malloc(n*sizeof(ClassInfo *));
    for (i = 0; i < n; i++)
      {
      ninfo->Classes[i] = (ClassInfo *)malloc(sizeof(ClassInfo));
      vtkParse_CopyClass(ninfo->Classes[i], orig->Classes[i]);
      }
    }

  n = orig->NumberOfFunctions;
  ninfo->NumberOfFunctions = n;
  if (n)
    {
    ninfo->Functions = (FunctionInfo **)malloc(n*sizeof(FunctionInfo *));
    for (i = 0; i < n; i++)
      {
      ninfo->Functions[i] = (FunctionInfo *)malloc(sizeof(FunctionInfo));
      vtkParse_CopyFunction(ninfo->Functions[i], orig->Functions[i]);
      }
    }

  n = orig->NumberOfConstants;
  ninfo->NumberOfConstants = n;
  if (n)
    {
    ninfo->Constants = (ValueInfo **)malloc(n*sizeof(ValueInfo *));
    for (i = 0; i < n; i++)
      {
      ninfo->Constants[i] = (ValueInfo *)malloc(sizeof(ValueInfo));
      vtkParse_CopyValue(ninfo->Constants[i], orig->Constants[i]);
      }
    }

  n = orig->NumberOfVariables;
  ninfo->NumberOfVariables = n;
  if (n)
    {
    ninfo->Variables = (ValueInfo **)malloc(n*sizeof(ValueInfo *));
    for (i = 0; i < n; i++)
      {
      ninfo->Variables[i] = (ValueInfo *)malloc(sizeof(ValueInfo));
      vtkParse_CopyValue(ninfo->Variables[i], orig->Variables[i]);
      }
    }

  n = orig->NumberOfEnums;
  ninfo->NumberOfEnums = n;
  if (n)
    {
    ninfo->Enums = (EnumInfo **)malloc(n*sizeof(EnumInfo *));
    for (i = 0; i < n; i++)
      {
      ninfo->Enums[i] = (EnumInfo *)malloc(sizeof(EnumInfo));
      vtkParse_CopyEnum(ninfo->Enums[i], orig->Enums[i]);
      }
    }

  n = orig->NumberOfTypedefs;
  ninfo->NumberOfTypedefs = n;
  if (n)
    {
    ninfo->Typedefs = (ValueInfo **)malloc(n*sizeof(ValueInfo *));
    for (i = 0; i < n; i++)
      {
      ninfo->Typedefs[i] = (ValueInfo *)malloc(sizeof(ValueInfo));
      vtkParse_CopyValue(ninfo->Typedefs[i], orig->Typedefs[i]);
      }
    }

  n = orig->NumberOfUsings;
  ninfo->NumberOfUsings = n;
  if (n)
    {
    ninfo->Usings = (UsingInfo **)malloc(n*sizeof(UsingInfo *));
    for (i = 0; i < n; i++)
      {
      ninfo->Usings[i] = (UsingInfo *)malloc(sizeof(UsingInfo));
      vtkParse_CopyUsing(ninfo->Usings[i], orig->Usings[i]);
      }
    }
}

Here is the call graph for this function:

void vtkParse_CopyTemplateArg ( TemplateArg *  data,
const TemplateArg *  orig 
)

Definition at line 8320 of file vtkParse.tab.c.

{
  arg->Template = NULL;

  if (orig->Template)
    {
    arg->Template = (TemplateArgs *)malloc(sizeof(TemplateArgs));
    vtkParse_CopyTemplateArgs(arg->Template, orig->Template);
    }

  arg->Type = orig->Type;
  arg->Class = orig->Class;
  arg->Name = orig->Name;
  arg->Value = orig->Value;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_CopyTemplateArgs ( TemplateArgs *  data,
const TemplateArgs *  orig 
)

Definition at line 8296 of file vtkParse.tab.c.

{
  unsigned long i, n;

  n = orig->NumberOfArguments;
  args->NumberOfArguments = n;
  args->Arguments = (TemplateArg **)malloc(n*sizeof(TemplateArg *));

  for (i = 0; i < n; i++)
    {
    args->Arguments[i] = (TemplateArg *)malloc(sizeof(TemplateArg));
    vtkParse_CopyTemplateArg(args->Arguments[i], orig->Arguments[i]);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_CopyUsing ( UsingInfo *  data,
const UsingInfo *  orig 
)

Definition at line 8526 of file vtkParse.tab.c.

{
  item->ItemType = orig->ItemType;
  item->Access = orig->Access;
  item->Name = orig->Name;
  item->Comment = orig->Comment;
  item->Scope = orig->Scope;
}

Here is the caller graph for this function:

void vtkParse_CopyValue ( ValueInfo *  data,
const ValueInfo *  orig 
)

Definition at line 8463 of file vtkParse.tab.c.

{
  unsigned long i, n;

  val->ItemType = orig->ItemType;
  val->Access = orig->Access;
  val->Name = orig->Name;
  val->Comment = orig->Comment;
  val->Value = orig->Value;
  val->Type = orig->Type;
  val->Class = orig->Class;
  val->Count = orig->Count;
  val->CountHint = orig->CountHint;

  n = orig->NumberOfDimensions;
  val->NumberOfDimensions = n;
  if (n)
    {
    val->Dimensions = (const char **)malloc(n*sizeof(char *));
    for (i = 0; i < n; i++)
      {
      val->Dimensions[i] = orig->Dimensions[i];
      }
    }

  val->Function = NULL;
  if (orig->Function)
    {
    val->Function = (FunctionInfo *)malloc(sizeof(FunctionInfo));
    vtkParse_CopyFunction(val->Function, orig->Function);
    }

  val->IsStatic = orig->IsStatic;
  val->IsEnum = orig->IsEnum;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* vtkParse_DuplicateString ( const char *  cp,
size_t  n 
)

Make a persistent copy of a string for use with AddStringToArray: At most 'n' chars will be copied, and the string will be terminated.

If a null pointer is provided, then a null pointer will be returned.

Definition at line 10116 of file vtkParse.tab.c.

{
  char *res = NULL;

  res = vtkstralloc(n);
  strncpy(res, cp, n);
  res[n] = '\0';

  return res;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_FreeClass ( ClassInfo *  cls)

Definition at line 8889 of file vtkParse.tab.c.

{
  int j, m;

  if (class_info->Template) { vtkParse_FreeTemplateArgs(class_info->Template); }

  m = class_info->NumberOfSuperClasses;
  if (m > 0) { free((char **)class_info->SuperClasses); }

  m = class_info->NumberOfClasses;
  for (j = 0; j < m; j++) { vtkParse_FreeClass(class_info->Classes[j]); }
  if (m > 0) { free(class_info->Classes); }

  m = class_info->NumberOfFunctions;
  for (j = 0; j < m; j++) { vtkParse_FreeFunction(class_info->Functions[j]); }
  if (m > 0) { free(class_info->Functions); }

  m = class_info->NumberOfConstants;
  for (j = 0; j < m; j++) { vtkParse_FreeValue(class_info->Constants[j]); }
  if (m > 0) { free(class_info->Constants); }

  m = class_info->NumberOfVariables;
  for (j = 0; j < m; j++) { vtkParse_FreeValue(class_info->Variables[j]); }
  if (m > 0) { free(class_info->Variables); }

  m = class_info->NumberOfEnums;
  for (j = 0; j < m; j++) { vtkParse_FreeEnum(class_info->Enums[j]); }
  if (m > 0) { free(class_info->Enums); }

  m = class_info->NumberOfTypedefs;
  for (j = 0; j < m; j++) { vtkParse_FreeValue(class_info->Typedefs[j]); }
  if (m > 0) { free(class_info->Typedefs); }

  m = class_info->NumberOfUsings;
  for (j = 0; j < m; j++) { vtkParse_FreeUsing(class_info->Usings[j]); }
  if (m > 0) { free(class_info->Usings); }

  if (class_info->NumberOfItems > 0) { free(class_info->Items); }

  free(class_info);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_FreeEnum ( EnumInfo *  item)

Definition at line 8858 of file vtkParse.tab.c.

{
  free(enum_info);
}

Here is the caller graph for this function:

void vtkParse_FreeFile ( FileInfo *  file_info)

Free methods.

void vtkParse_FreeFunction ( FunctionInfo *  func)

Definition at line 8868 of file vtkParse.tab.c.

{
  int j, m;

  if (function_info->Template)
    {
    vtkParse_FreeTemplateArgs(function_info->Template);
    }

  m = function_info->NumberOfArguments;
  for (j = 0; j < m; j++) { vtkParse_FreeValue(function_info->Arguments[j]); }
  if (m > 0) { free(function_info->Arguments); }

  if (function_info->ReturnValue)
    {
    vtkParse_FreeValue(function_info->ReturnValue);
    }

  free(function_info);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_FreeNamespace ( NamespaceInfo *  namespace_info)

Definition at line 8931 of file vtkParse.tab.c.

{
  int j, m;

  m = namespace_info->NumberOfClasses;
  for (j = 0; j < m; j++) { vtkParse_FreeClass(namespace_info->Classes[j]); }
  if (m > 0) { free(namespace_info->Classes); }

  m = namespace_info->NumberOfFunctions;
  for (j=0; j<m; j++) { vtkParse_FreeFunction(namespace_info->Functions[j]); }
  if (m > 0) { free(namespace_info->Functions); }

  m = namespace_info->NumberOfConstants;
  for (j=0; j<m; j++) { vtkParse_FreeValue(namespace_info->Constants[j]); }
  if (m > 0) { free(namespace_info->Constants); }

  m = namespace_info->NumberOfVariables;
  for (j=0; j<m; j++) { vtkParse_FreeValue(namespace_info->Variables[j]); }
  if (m > 0) { free(namespace_info->Variables); }

  m = namespace_info->NumberOfEnums;
  for (j = 0; j < m; j++) { vtkParse_FreeEnum(namespace_info->Enums[j]); }
  if (m > 0) { free(namespace_info->Enums); }

  m = namespace_info->NumberOfTypedefs;
  for (j = 0; j < m; j++) { vtkParse_FreeValue(namespace_info->Typedefs[j]); }
  if (m > 0) { free(namespace_info->Typedefs); }

  m = namespace_info->NumberOfUsings;
  for (j = 0; j < m; j++) { vtkParse_FreeUsing(namespace_info->Usings[j]); }
  if (m > 0) { free(namespace_info->Usings); }

  m = namespace_info->NumberOfNamespaces;
  for (j=0; j<m; j++) {vtkParse_FreeNamespace(namespace_info->Namespaces[j]);}
  if (m > 0) { free(namespace_info->Namespaces); }

  free(namespace_info);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_FreeTemplateArg ( TemplateArg *  arg)
void vtkParse_FreeTemplateArgs ( TemplateArgs *  arg)

Definition at line 8825 of file vtkParse.tab.c.

{
  int j, m;

  m = template_info->NumberOfArguments;
  for (j = 0; j < m; j++)
    {
    if (template_info->Arguments[j]->Template)
      {
      vtkParse_FreeTemplateArgs(template_info->Arguments[j]->Template);
      }
    free(template_info->Arguments[j]);
    }

  free(template_info);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_FreeUsing ( UsingInfo *  item)

Definition at line 8863 of file vtkParse.tab.c.

{
  free(using_info);
}

Here is the caller graph for this function:

void vtkParse_FreeValue ( ValueInfo *  val)

Definition at line 8844 of file vtkParse.tab.c.

{
  if (value_info->NumberOfDimensions)
    {
    free((char **)value_info->Dimensions);
    }
  if (value_info->Function)
    {
    vtkParse_FreeFunction(value_info->Function);
    }

  free(value_info);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void vtkParse_InitClass ( ClassInfo *  cls)

Definition at line 8536 of file vtkParse.tab.c.

{
  cls->ItemType = VTK_CLASS_INFO;
  cls->Access = VTK_ACCESS_PUBLIC;
  cls->Name = NULL;
  cls->Comment = NULL;
  cls->Template = NULL;
  cls->NumberOfSuperClasses = 0;
  cls->NumberOfItems = 0;
  cls->NumberOfClasses = 0;
  cls->NumberOfFunctions = 0;
  cls->NumberOfConstants = 0;
  cls->NumberOfVariables = 0;
  cls->NumberOfEnums = 0;
  cls->NumberOfTypedefs = 0;
  cls->NumberOfUsings = 0;
  cls->IsAbstract = 0;
  cls->HasDelete = 0;
}

Here is the caller graph for this function:

void vtkParse_InitEnum ( EnumInfo *  item)

Definition at line 8500 of file vtkParse.tab.c.

{
  item->ItemType = VTK_ENUM_INFO;
  item->Access = VTK_ACCESS_PUBLIC;
  item->Name = NULL;
  item->Comment = NULL;
}

Here is the caller graph for this function:

void vtkParse_InitFile ( FileInfo *  file_info)

Initializer methods.

Definition at line 8812 of file vtkParse.tab.c.

{
  /* file info */
  file_info->FileName = NULL;
  file_info->NameComment = NULL;
  file_info->Description = NULL;
  file_info->Caveats = NULL;
  file_info->SeeAlso = NULL;

  file_info->MainClass = NULL;
  file_info->Contents = NULL;
}

Here is the caller graph for this function:

void vtkParse_InitFunction ( FunctionInfo *  func)

Definition at line 8337 of file vtkParse.tab.c.

{
  unsigned long i;

  func->ItemType = VTK_FUNCTION_INFO;
  func->Access = VTK_ACCESS_PUBLIC;
  func->Name = NULL;
  func->Comment = NULL;
  func->Class = NULL;
  func->Signature = NULL;
  func->Template = NULL;
  func->NumberOfArguments = 0;
  func->ReturnValue = NULL;
  func->Macro = NULL;
  func->SizeHint = NULL;
  func->IsStatic = 0;
  func->IsVirtual = 0;
  func->IsPureVirtual = 0;
  func->IsOperator = 0;
  func->IsVariadic = 0;
  func->IsConst = 0;
  func->IsExplicit = 0;

  /* everything below here is legacy information, *
   * maintained only for backwards compatibility  */
  func->ReturnType = VTK_PARSE_VOID;
  func->ReturnClass = NULL;
  func->HaveHint = 0;
  func->HintSize = 0;
  func->IsLegacy = 0;
  func->ArrayFailure = 0;
  func->IsPublic = 0;
  func->IsProtected = 0;

  for (i = 0; i < MAX_ARGS; i++)
    {
    func->ArgTypes[i] = 0;
    func->ArgClasses[i] = 0;
    func->ArgCounts[i] = 0;
    }
}

Here is the caller graph for this function:

void vtkParse_InitNamespace ( NamespaceInfo *  namespace_info)

Definition at line 8685 of file vtkParse.tab.c.

{
  /* namespace info */
  name_info->ItemType = VTK_NAMESPACE_INFO;
  name_info->Access = VTK_ACCESS_PUBLIC;
  name_info->Name = NULL;
  name_info->Comment = NULL;
  name_info->NumberOfItems = 0;
  name_info->NumberOfClasses = 0;
  name_info->NumberOfFunctions = 0;
  name_info->NumberOfConstants = 0;
  name_info->NumberOfVariables = 0;
  name_info->NumberOfEnums = 0;
  name_info->NumberOfTypedefs = 0;
  name_info->NumberOfUsings = 0;
  name_info->NumberOfNamespaces = 0;
}

Here is the caller graph for this function:

void vtkParse_InitTemplateArg ( TemplateArg *  arg)

Definition at line 8311 of file vtkParse.tab.c.

{
  arg->Template = NULL;
  arg->Type = 0;
  arg->Class = NULL;
  arg->Name = NULL;
  arg->Value = NULL;
}

Here is the caller graph for this function:

void vtkParse_InitTemplateArgs ( TemplateArgs *  arg)

Definition at line 8291 of file vtkParse.tab.c.

{
  args->NumberOfArguments = 0;
}

Here is the caller graph for this function:

void vtkParse_InitUsing ( UsingInfo *  item)

Definition at line 8517 of file vtkParse.tab.c.

{
  item->ItemType = VTK_USING_INFO;
  item->Access = VTK_ACCESS_PUBLIC;
  item->Name = NULL;
  item->Comment = NULL;
  item->Scope = NULL;
}

Here is the caller graph for this function:

void vtkParse_InitValue ( ValueInfo *  val)

Definition at line 8446 of file vtkParse.tab.c.

{
  val->ItemType = VTK_VARIABLE_INFO;
  val->Access = VTK_ACCESS_PUBLIC;
  val->Name = NULL;
  val->Comment = NULL;
  val->Value = NULL;
  val->Type = 0;
  val->Class = NULL;
  val->Count = 0;
  val->CountHint = NULL;
  val->NumberOfDimensions = 0;
  val->Function = NULL;
  val->IsStatic = 0;
  val->IsEnum = 0;
}

Here is the caller graph for this function:

unsigned int vtkParse_MapType ( int  vtktype)

Simple utility for mapping VTK types to VTK_PARSE types.

Definition at line 10488 of file vtkParse.tab.c.

{
  if (vtktype > 0 && vtktype <= VTK_UNICODE_STRING)
    {
    return vtkParseTypeMap[vtktype];
    }
  return 0;
}

Here is the caller graph for this function:

void vtkParse_SetIgnoreBTX ( int  option)

Ignore BTX/ETX markers.

Definition at line 10225 of file vtkParse.tab.c.

{
  if (option)
    {
    IgnoreBTX = 1;
    }
  else
    {
    IgnoreBTX = 0;
    }
}

Here is the caller graph for this function: