VTK
|
#include "vtkParseData.h"
Go to the source code of this file.
Classes | |
struct | _HierarchyEntry |
This file contains utility functions for loading and parsing a VTK hierarchy file. More... | |
struct | _HierarchyInfo |
All the entries from a hierarchy file. More... | |
Typedefs | |
typedef struct _HierarchyEntry | HierarchyEntry |
This file contains utility functions for loading and parsing a VTK hierarchy file. | |
typedef struct _HierarchyInfo | HierarchyInfo |
All the entries from a hierarchy file. | |
Functions | |
HierarchyInfo * | vtkParseHierarchy_ReadFile (const char *filename) |
Read a hierarchy file into a HeirarchyInfo struct, or return NULL. | |
void | vtkParseHierarchy_Free (HierarchyInfo *info) |
Free a HierarchyInfo struct. | |
HierarchyEntry * | vtkParseHierarchy_FindEntry (const HierarchyInfo *info, const char *classname) |
Return the entry for a class or type, or null if not found. | |
const char * | vtkParseHierarchy_GetProperty (const HierarchyEntry *entry, const char *property) |
Get properties for the class. | |
int | vtkParseHierarchy_IsTypeOf (const HierarchyInfo *info, const HierarchyEntry *entry, const char *baseclass) |
Check whether class is derived from baseclass. | |
int | vtkParseHierarchy_IsTypeOfTemplated (const HierarchyInfo *info, const HierarchyEntry *entry, const char *classname, const char *baseclass, const char **baseclass_with_args) |
Check whether class is derived from baseclass. | |
void | vtkParseHierarchy_FreeTemplateArgs (int n, const char *args[]) |
Free the template args returned by IsTypeOfTemplated. | |
const char * | vtkParseHierarchy_TemplatedSuperClass (const HierarchyEntry *entry, const char *classname, int i) |
Given a classname with template parameters, get the superclass name with corresponding template parameters. | |
int | vtkParseHierarchy_ExpandTypedefsInValue (const HierarchyInfo *info, ValueInfo *data, StringCache *cache, const char *scope) |
Expand all unrecognized types in a ValueInfo struct by using the typedefs in the HierarchyInfo struct. | |
const char * | vtkParseHierarchy_ExpandTypedefsInName (const HierarchyInfo *info, const char *text, const char *scope) |
Expand typedefs found in a name stored as a string. |
typedef struct _HierarchyEntry HierarchyEntry |
This file contains utility functions for loading and parsing a VTK hierarchy file.
The file contains entries like the following (one per line in the file):
classname [ : superclass ] ; header.h ; vtkKit [; flags]
For each typedef, the output file will have a line like this:
name = &[2][3]* const type ; header.h ; vtkKit [; flags]
For each enum, the output file will have:
enumname : enum ; header.h ; vtkKit [; flags] One entry from the hierarchy file. It contains a class name, the superclasses, and the header file.
typedef struct _HierarchyInfo HierarchyInfo |
All the entries from a hierarchy file.
HierarchyInfo* vtkParseHierarchy_ReadFile | ( | const char * | filename | ) |
Read a hierarchy file into a HeirarchyInfo struct, or return NULL.
void vtkParseHierarchy_Free | ( | HierarchyInfo * | info | ) |
Free a HierarchyInfo struct.
HierarchyEntry* vtkParseHierarchy_FindEntry | ( | const HierarchyInfo * | info, |
const char * | classname | ||
) |
Return the entry for a class or type, or null if not found.
const char* vtkParseHierarchy_GetProperty | ( | const HierarchyEntry * | entry, |
const char * | property | ||
) |
Get properties for the class.
Returns NULL if the property is not set, and returns either an empty string or a value string if the property is set. The properties supported are as follows: "WRAP_EXCLUDE", "WRAP_SPECIAL", and "ABSTRACT"
int vtkParseHierarchy_IsTypeOf | ( | const HierarchyInfo * | info, |
const HierarchyEntry * | entry, | ||
const char * | baseclass | ||
) |
Check whether class is derived from baseclass.
int vtkParseHierarchy_IsTypeOfTemplated | ( | const HierarchyInfo * | info, |
const HierarchyEntry * | entry, | ||
const char * | classname, | ||
const char * | baseclass, | ||
const char ** | baseclass_with_args | ||
) |
Check whether class is derived from baseclass.
You must supply the entry for the class (returned by FindEntry) as well as the classname. The classname can include template args in angle brackets. The baseclass_with_args parameter, if not set to NULL, will be used to return the name of base class with the template args in angle brackets that classname was derived from. If not set to NULL, this should be freed with free() to avoid a memory leak.
void vtkParseHierarchy_FreeTemplateArgs | ( | int | n, |
const char * | args[] | ||
) |
Free the template args returned by IsTypeOfTemplated.
const char* vtkParseHierarchy_TemplatedSuperClass | ( | const HierarchyEntry * | entry, |
const char * | classname, | ||
int | i | ||
) |
Given a classname with template parameters, get the superclass name with corresponding template parameters.
Returns null if 'i' is out of range, i.e. greater than or equal to the number of superclasses. The returned classname must be freed with "free()".
int vtkParseHierarchy_ExpandTypedefsInValue | ( | const HierarchyInfo * | info, |
ValueInfo * | data, | ||
StringCache * | cache, | ||
const char * | scope | ||
) |
Expand all unrecognized types in a ValueInfo struct by using the typedefs in the HierarchyInfo struct.
const char* vtkParseHierarchy_ExpandTypedefsInName | ( | const HierarchyInfo * | info, |
const char * | text, | ||
const char * | scope | ||
) |
Expand typedefs found in a name stored as a string.
The value of "text" will be returned if no expansion occurred, else a new string is returned that must be freed with "free()".