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