Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CEGUIConfig_xmlHandler.h

Go to the documentation of this file.
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 
00032 #include "xercesc/sax2/DefaultHandler.hpp"
00033 
00034 #include <vector>
00035 
00036 // Start of CEGUI namespace section
00037 namespace CEGUI
00038 {
00043 class Config_xmlHandler : public XERCES_CPP_NAMESPACE::DefaultHandler
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    startElement(const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname, const XERCES_CPP_NAMESPACE::Attributes& attrs);
00069 
00070 
00075         virtual void  warning (const XERCES_CPP_NAMESPACE::SAXParseException &exc);
00076         virtual void  error (const XERCES_CPP_NAMESPACE::SAXParseException &exc);
00077         virtual void  fatalError (const XERCES_CPP_NAMESPACE::SAXParseException &exc);
00078 
00079         /*************************************************************************
00080                 Functions used by our implementation
00081         *************************************************************************/
00086         const String&   getLogFilename(void) const                              {return d_logFilename;}
00087 
00088 
00093         const String&   getSchemeFilename(void) const                   {return d_schemeFilename;}
00094 
00095 
00100         const String&   getLayoutFilename(void) const                   {return d_layoutFilename;}
00101 
00102 
00107         const String&   getInitScriptFilename(void) const               {return d_initScriptFilename;}
00108 
00109 
00114         const String&   getTermScriptFilename(void) const               {return d_termScriptFilename;}
00115 
00116 
00121         const String&   getDefaultFontName(void) const          {return d_defaultFontName;}
00122 
00123 
00128         const String&   getDefaultResourceGroup(void) const             {return d_defaultResourceGroup;}
00129 
00130 
00131 private:
00132         /*************************************************************************
00133                 Implementation Constants
00134         *************************************************************************/
00135         static const String CEGUIConfigElement;                         
00136         static const char       ConfigLogfileAttribute[];                       
00137         static const char       ConfigSchemeAttribute[];                        
00138         static const char       ConfigLayoutAttribute[];                        
00139         static const char       ConfigDefaultFontAttribute[];           
00140         static const char       ConfigInitScriptAttribute[];            
00141         static const char       ConfigTerminateScriptAttribute[];       
00142     static const char   ConfigDefaultResourceGroupAttribute[]; 
00143 
00144         /*************************************************************************
00145                 Implementation Data
00146         *************************************************************************/
00147         String          d_logFilename;                  
00148         String          d_schemeFilename;               
00149         String          d_layoutFilename;               
00150         String          d_initScriptFilename;   
00151         String          d_termScriptFilename;   
00152         String          d_defaultFontName;              
00153     String      d_defaultResourceGroup; 
00154 };
00155 
00156 
00157 } // End of  CEGUI namespace section
00158 
00159 #endif  // end of guard _CEGUIConfig_xmlHandler_h_

Generated on Wed Feb 16 12:41:05 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1