CEGUIConfig_xmlHandler.h

00001 /************************************************************************
00002         filename:       CEGUIConfig_xmlHandler.h
00003         created:        17/7/2004
00004         author:         Paul D Turner
00005         
00006         purpose:        Interface to configuration file parser
00007 *************************************************************************/
00008 /*************************************************************************
00009     Crazy Eddie's GUI System (http://www.cegui.org.uk)
00010     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
00011 
00012     This library is free software; you can redistribute it and/or
00013     modify it under the terms of the GNU Lesser General Public
00014     License as published by the Free Software Foundation; either
00015     version 2.1 of the License, or (at your option) any later version.
00016 
00017     This library is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020     Lesser General Public License for more details.
00021 
00022     You should have received a copy of the GNU Lesser General Public
00023     License along with this library; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 *************************************************************************/
00026 #ifndef _CEGUIConfig_xmlHandler_h_
00027 #define _CEGUIConfig_xmlHandler_h_
00028 
00029 #include "CEGUIBase.h"
00030 #include "CEGUIString.h"
00031 #include "CEGUILogger.h"
00032 #include "CEGUIXMLHandler.h"
00033 
00034 #include <vector>
00035 
00036 // Start of CEGUI namespace section
00037 namespace CEGUI
00038 {
00043 class Config_xmlHandler : public XMLHandler
00044 {
00045 public:
00046         /*************************************************************************
00047                 Construction & Destruction
00048         *************************************************************************/
00053         Config_xmlHandler(void) {}
00054 
00059         virtual ~Config_xmlHandler(void) {}
00060 
00061         /*************************************************************************
00062                 SAX2 Handler overrides
00063         *************************************************************************/ 
00068     virtual void elementStart(const String& element, const XMLAttributes& attributes);
00069 
00070         /*************************************************************************
00071                 Functions used by our implementation
00072         *************************************************************************/
00077         const String&   getLogFilename(void) const                              {return d_logFilename;}
00078 
00079 
00084         const String&   getSchemeFilename(void) const                   {return d_schemeFilename;}
00085 
00086 
00091         const String&   getLayoutFilename(void) const                   {return d_layoutFilename;}
00092 
00093 
00098         const String&   getInitScriptFilename(void) const               {return d_initScriptFilename;}
00099 
00100 
00105         const String&   getTermScriptFilename(void) const               {return d_termScriptFilename;}
00106 
00107 
00112         const String&   getDefaultFontName(void) const          {return d_defaultFontName;}
00113 
00114 
00119         const String&   getDefaultResourceGroup(void) const             {return d_defaultResourceGroup;}
00120 
00125     LoggingLevel getLoggingLevel(void) const     {return d_logLevel;}
00126 
00127 
00128 private:
00129         /*************************************************************************
00130                 Implementation Constants
00131         *************************************************************************/
00132         static const String CEGUIConfigElement;                         
00133         static const char       ConfigLogfileAttribute[];                       
00134         static const char       ConfigSchemeAttribute[];                        
00135         static const char       ConfigLayoutAttribute[];                        
00136         static const char       ConfigDefaultFontAttribute[];           
00137         static const char       ConfigInitScriptAttribute[];            
00138         static const char       ConfigTerminateScriptAttribute[];       
00139     static const char   ConfigDefaultResourceGroupAttribute[]; 
00140     static const char   ConfigLoggingLevelAttribute[];      
00141 
00142         /*************************************************************************
00143                 Implementation Data
00144         *************************************************************************/
00145         String          d_logFilename;                  
00146         String          d_schemeFilename;               
00147         String          d_layoutFilename;               
00148         String          d_initScriptFilename;   
00149         String          d_termScriptFilename;   
00150         String          d_defaultFontName;              
00151     String      d_defaultResourceGroup; 
00152     LoggingLevel    d_logLevel;         
00153 };
00154 
00155 
00156 } // End of  CEGUI namespace section
00157 
00158 #endif  // end of guard _CEGUIConfig_xmlHandler_h_

Generated on Sat Nov 26 09:34:48 2005 for Crazy Eddies GUI System by  doxygen 1.4.5