VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkParseExtras.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) 2011 David Gobbi. 00017 00018 Contributed to the VisualizationToolkit by the author in May 2011 00019 under the terms of the Visualization Toolkit 2008 copyright. 00020 -------------------------------------------------------------------------*/ 00021 00026 #ifndef VTK_PARSE_EXTRAS_H 00027 #define VTK_PARSE_EXTRAS_H 00028 00029 #include "vtkParseData.h" 00030 #include <stddef.h> 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00041 size_t vtkParse_IdentifierLength(const char *text); 00042 00049 size_t vtkParse_NameLength(const char *text); 00050 00056 size_t vtkParse_UnscopedNameLength(const char *text); 00057 00063 size_t vtkParse_LiteralLength(const char *text); 00064 00073 size_t vtkParse_BasicTypeFromString( 00074 const char *text, unsigned int *type, 00075 const char **classname, size_t *classname_len); 00076 00082 size_t vtkParse_ValueInfoFromString( 00083 ValueInfo *val, StringCache *cache, const char *text); 00084 00091 const char *vtkParse_ValueInfoToString(ValueInfo *val, int *nf); 00092 00097 void vtkParse_ExpandTypedef(ValueInfo *valinfo, ValueInfo *typedefinfo); 00098 00103 void vtkParse_ExpandTypedefs( 00104 ValueInfo *valinfo, StringCache *cache, 00105 int n, const char *name[], const char *val[], 00106 ValueInfo *typedefinfo[]); 00107 00113 void vtkParse_ExpandValues( 00114 ValueInfo *valinfo, StringCache *cache, 00115 int n, const char *name[], const char *val[]); 00116 00120 const char *vtkParse_StringReplace( 00121 const char *str1, int n, const char *name[], const char *val[]); 00122 00128 size_t vtkParse_DecomposeTemplatedType( 00129 const char *text, const char **classname, 00130 int n, const char ***args, const char *defaults[]); 00131 00135 void vtkParse_FreeTemplateDecomposition( 00136 const char *classname, int n, const char **args); 00137 00145 void vtkParse_InstantiateClassTemplate( 00146 ClassInfo *data, StringCache *cache, int n, const char *args[]); 00147 00155 void vtkParse_IntantiateFunctionTemplate( 00156 FunctionInfo *data, int n, const char *args[]); 00157 00161 const char **vtkParse_GetTemplateMacroTypes(); 00162 00166 const char **vtkParse_GetArrayTypes(); 00167 00168 00169 #ifdef __cplusplus 00170 } /* extern "C" */ 00171 #endif 00172 00173 #endif