VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkParseHierarchy.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright (c) 2010 David Gobbi. 00017 00018 Contributed to the VisualizationToolkit by the author in June 2010 00019 under the terms of the Visualization Toolkit 2008 copyright. 00020 --------------------------------------------------------------------------*/ 00021 00039 #ifndef VTK_PARSE_HIERARCHY_H 00040 #define VTK_PARSE_HIERARCHY_H 00041 00042 /* Need the ValueInfo struct for typedefs */ 00043 #include "vtkParseData.h" 00044 00049 typedef struct _HierarchyEntry 00050 { 00051 const char *Name; /* the class or type name */ 00052 const char *HeaderFile; /* header file the class is defined in */ 00053 const char *Module; /* library the class is defined in */ 00054 int NumberOfTemplateParameters; /* number of template params */ 00055 const char **TemplateParameters; 00056 const char **TemplateDefaults; 00057 int NumberOfProperties; /* number of properties */ 00058 const char **Properties; 00059 int NumberOfSuperClasses; /* number of superclasses */ 00060 const char **SuperClasses; 00061 int *SuperClassIndex; /* for internal use only */ 00062 ValueInfo *Typedef; /* for typedefs */ 00063 int IsEnum; /* this entry is for an enum type */ 00064 int IsTypedef; /* this entry is for a typedef */ 00065 } HierarchyEntry; 00066 00070 typedef struct _HierarchyInfo 00071 { 00072 int NumberOfEntries; 00073 HierarchyEntry *Entries; 00074 StringCache *Strings; 00075 } HierarchyInfo; 00076 00077 #ifdef __cplusplus 00078 extern "C" { 00079 #endif 00080 00084 HierarchyInfo *vtkParseHierarchy_ReadFile(const char *filename); 00085 00089 void vtkParseHierarchy_Free(HierarchyInfo *info); 00090 00094 HierarchyEntry *vtkParseHierarchy_FindEntry( 00095 const HierarchyInfo *info, const char *classname); 00096 00103 const char *vtkParseHierarchy_GetProperty( 00104 const HierarchyEntry *entry, const char *property); 00105 00109 int vtkParseHierarchy_IsTypeOf(const HierarchyInfo *info, 00110 const HierarchyEntry *entry, const char *baseclass); 00111 00121 int vtkParseHierarchy_IsTypeOfTemplated(const HierarchyInfo *info, 00122 const HierarchyEntry *entry, const char *classname, 00123 const char *baseclass, const char **baseclass_with_args); 00124 00128 void vtkParseHierarchy_FreeTemplateArgs(int n, const char *args[]); 00129 00136 const char *vtkParseHierarchy_TemplatedSuperClass( 00137 const HierarchyEntry *entry, const char *classname, int i); 00138 00143 int vtkParseHierarchy_ExpandTypedefsInValue( 00144 const HierarchyInfo *info, ValueInfo *data, StringCache *cache, 00145 const char *scope); 00146 00152 const char *vtkParseHierarchy_ExpandTypedefsInName( 00153 const HierarchyInfo *info, const char *text, const char *scope); 00154 00155 #ifdef __cplusplus 00156 } /* extern "C" */ 00157 #endif 00158 00159 #endif