Crazy Eddies GUI System  0.6.0
CEGUIConfig_xmlHandler.h
1 /***********************************************************************
2  filename: CEGUIConfig_xmlHandler.h
3  created: 17/7/2004
4  author: Paul D Turner
5 
6  purpose: Interface to configuration file parser
7 *************************************************************************/
8 /***************************************************************************
9  * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
10  *
11  * Permission is hereby granted, free of charge, to any person obtaining
12  * a copy of this software and associated documentation files (the
13  * "Software"), to deal in the Software without restriction, including
14  * without limitation the rights to use, copy, modify, merge, publish,
15  * distribute, sublicense, and/or sell copies of the Software, and to
16  * permit persons to whom the Software is furnished to do so, subject to
17  * the following conditions:
18  *
19  * The above copyright notice and this permission notice shall be
20  * included in all copies or substantial portions of the Software.
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
25  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
26  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
27  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28  * OTHER DEALINGS IN THE SOFTWARE.
29  ***************************************************************************/
30 #ifndef _CEGUIConfig_xmlHandler_h_
31 #define _CEGUIConfig_xmlHandler_h_
32 
33 #include "CEGUIBase.h"
34 #include "CEGUIString.h"
35 #include "CEGUILogger.h"
36 #include "CEGUIXMLHandler.h"
37 
38 #include <vector>
39 
40 // Start of CEGUI namespace section
41 namespace CEGUI
42 {
48 {
49 public:
50  /*************************************************************************
51  Construction & Destruction
52  *************************************************************************/
58 
63  virtual ~Config_xmlHandler(void) {}
64 
65  /*************************************************************************
66  SAX2 Handler overrides
67  *************************************************************************/
72  virtual void elementStart(const String& element, const XMLAttributes& attributes);
73 
74  /*************************************************************************
75  Functions used by our implementation
76  *************************************************************************/
81  const String& getLogFilename(void) const {return d_logFilename;}
82 
83 
88  const String& getSchemeFilename(void) const {return d_schemeFilename;}
89 
90 
95  const String& getLayoutFilename(void) const {return d_layoutFilename;}
96 
97 
102  const String& getInitScriptFilename(void) const {return d_initScriptFilename;}
103 
104 
109  const String& getTermScriptFilename(void) const {return d_termScriptFilename;}
110 
111 
116  const String& getDefaultFontName(void) const {return d_defaultFontName;}
117 
118 
123  const String& getDefaultResourceGroup(void) const {return d_defaultResourceGroup;}
124 
129  LoggingLevel getLoggingLevel(void) const {return d_logLevel;}
130 
131 
132 private:
133  /*************************************************************************
134  Implementation Constants
135  *************************************************************************/
136  static const String CEGUIConfigElement;
137  static const char ConfigLogfileAttribute[];
138  static const char ConfigSchemeAttribute[];
139  static const char ConfigLayoutAttribute[];
140  static const char ConfigDefaultFontAttribute[];
141  static const char ConfigInitScriptAttribute[];
142  static const char ConfigTerminateScriptAttribute[];
143  static const char ConfigDefaultResourceGroupAttribute[];
144  static const char ConfigLoggingLevelAttribute[];
145 
146  /*************************************************************************
147  Implementation Data
148  *************************************************************************/
149  String d_logFilename;
150  String d_schemeFilename;
151  String d_layoutFilename;
152  String d_initScriptFilename;
153  String d_termScriptFilename;
154  String d_defaultFontName;
155  String d_defaultResourceGroup;
156  LoggingLevel d_logLevel;
157 };
158 
159 
160 } // End of CEGUI namespace section
161 
162 #endif // end of guard _CEGUIConfig_xmlHandler_h_