2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
5 This file is part of GtkRadiant.
7 GtkRadiant is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 GtkRadiant is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 \brief entity files loader API
24 this describes the APIs involved when loading entity description files
25 (initially, .def and .fgd)
31 #define ECLASS_MAJOR "eclass"
33 typedef void (* PFN_ECLASS_SCANFILE) (char *filename);
34 typedef const char* (* PFN_ECLASS_GETEXTENSION) ();
39 PFN_ECLASS_SCANFILE m_pfnScanFile;
40 PFN_ECLASS_GETEXTENSION m_pfnGetExtension;
43 #ifdef USE_ECLASSTABLE_DEFINE
44 #ifndef __ECLASSTABLENAME
45 #define __ECLASSTABLENAME g_EClassTable
47 #define EClass_ScanFile __ECLASSTABLENAME.m_pfnEClass_ScanFile
48 #define EClass_GetExtension __ECLASSTABLENAME.m_pfnEClass_GetExtension
51 #define ECLASSMANAGER_MAJOR "eclassmanager"
53 typedef void (* PFN_ECLASS_INSERTALPHABETIZED) (eclass_t *e);
54 typedef eclass_t** (* PFN_GET_ECLASS_E) ();
55 typedef void (* PFN_SET_ECLASS_FOUND) (qboolean);
56 typedef qboolean (* PFN_GET_PARSING_SINGLE) ();
57 typedef eclass_t* (* PFN_ECLASS_CREATE) (const char *name, float col1, float col2, float col3, const vec3_t *mins, const vec3_t *maxs, const char *comments);
58 typedef eclass_t* (* PFN_ECLASS_FORNAME) (const char* name, qboolean has_brushes);
60 struct _EClassManagerTable
63 PFN_ECLASS_INSERTALPHABETIZED m_pfnEclass_InsertAlphabetized;
64 PFN_GET_ECLASS_E m_pfnGet_Eclass_E;
65 PFN_SET_ECLASS_FOUND m_pfnSet_Eclass_Found;
66 PFN_GET_PARSING_SINGLE m_pfnGet_Parsing_Single;
67 PFN_ECLASS_CREATE m_pfnEClass_Create;
68 PFN_ECLASS_FORNAME m_pfnEclass_ForName;
71 #ifdef USE_ECLASSMANAGER_DEFINE
72 #ifndef __ECLASSMANAGERTABLENAME
73 #define __ECLASSMANAGERTABLENAME g_EClassManagerTable
75 #define Eclass_InsertAlphabetized __ECLASSMANAGERTABLENAME.m_pfnEclass_InsertAlphabetized
76 #define Get_Eclass_E __ECLASSMANAGERTABLENAME.m_pfnGet_Eclass_E
77 #define Set_Eclass_Found __ECLASSMANAGERTABLENAME.m_pfnSet_Eclass_Found
78 #define Get_Parsing_Single __ECLASSMANAGERTABLENAME.m_pfnGet_Parsing_Single
79 #define EClass_Create __ECLASSMANAGERTABLENAME.m_pfnEClass_Create
80 #define Eclass_ForName __ECLASSMANAGERTABLENAME.m_pfnEclass_ForName