1 | /************************************************************************
|
---|
2 | filename: CEGUIScheme_xmlHandler.h
|
---|
3 | created: 21/2/2004
|
---|
4 | author: Paul D Turner
|
---|
5 |
|
---|
6 | purpose: Defines abstract base class for the GUI Scheme object.
|
---|
7 | *************************************************************************/
|
---|
8 | /*************************************************************************
|
---|
9 | Crazy Eddie's GUI System (http://www.cegui.org.uk)
|
---|
10 | Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
|
---|
11 |
|
---|
12 | This library is free software; you can redistribute it and/or
|
---|
13 | modify it under the terms of the GNU Lesser General Public
|
---|
14 | License as published by the Free Software Foundation; either
|
---|
15 | version 2.1 of the License, or (at your option) any later version.
|
---|
16 |
|
---|
17 | This library is distributed in the hope that it will be useful,
|
---|
18 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | Lesser General Public License for more details.
|
---|
21 |
|
---|
22 | You should have received a copy of the GNU Lesser General Public
|
---|
23 | License along with this library; if not, write to the Free Software
|
---|
24 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
25 | *************************************************************************/
|
---|
26 | #ifndef _CEGUIScheme_xmlHandler_h_
|
---|
27 | #define _CEGUIScheme_xmlHandler_h_
|
---|
28 |
|
---|
29 | #include "CEGUIScheme.h"
|
---|
30 | #include "CEGUIXMLHandler.h"
|
---|
31 |
|
---|
32 | // Start of CEGUI namespace section
|
---|
33 | namespace CEGUI
|
---|
34 | {
|
---|
35 |
|
---|
36 | /*!
|
---|
37 | \brief
|
---|
38 | Handler class used to parse the Scheme XML files using SAX2
|
---|
39 | */
|
---|
40 | class Scheme_xmlHandler : public XMLHandler
|
---|
41 | {
|
---|
42 | public:
|
---|
43 | /*************************************************************************
|
---|
44 | Construction & Destruction
|
---|
45 | *************************************************************************/
|
---|
46 | /*!
|
---|
47 | \brief
|
---|
48 | Constructor for Scheme::xmlHandler objects
|
---|
49 |
|
---|
50 | \param scheme
|
---|
51 | Pointer to the Scheme object creating this xmlHandler object
|
---|
52 | */
|
---|
53 | Scheme_xmlHandler(Scheme* scheme) : d_scheme(scheme)
|
---|
54 | {}
|
---|
55 |
|
---|
56 | /*!
|
---|
57 | \brief
|
---|
58 | Destructor for Scheme::xmlHandler objects
|
---|
59 | */
|
---|
60 | virtual ~Scheme_xmlHandler(void)
|
---|
61 | {}
|
---|
62 |
|
---|
63 | /*************************************************************************
|
---|
64 | SAX2 Handler overrides
|
---|
65 | *************************************************************************/
|
---|
66 | /*!
|
---|
67 | \brief
|
---|
68 | document processing (only care about elements, schema validates format)
|
---|
69 | */
|
---|
70 | virtual void elementStart(const String& element, const XMLAttributes& attributes);
|
---|
71 | virtual void elementEnd(const String& element);
|
---|
72 |
|
---|
73 | private:
|
---|
74 | /*************************************************************************
|
---|
75 | Implementation Constants
|
---|
76 | *************************************************************************/
|
---|
77 | // XML related strings
|
---|
78 | static const String GUISchemeElement; //!< Root GUIScheme element.
|
---|
79 | static const String ImagesetElement; //!< Element specifying an Imageset
|
---|
80 | static const String FontElement; //!< Element specifying a Font
|
---|
81 | static const String WindowSetElement; //!< Element specifying a module and set of WindowFactory elements.
|
---|
82 | static const String WindowFactoryElement; //!< Element specifying a WindowFactory type.
|
---|
83 | static const String WindowAliasElement; //!< Element specifying a WindowFactory type alias
|
---|
84 | static const char NameAttribute[]; //!< Attribute specifying the name of some object.
|
---|
85 | static const char FilenameAttribute[]; //!< Attribute specifying the name of some file.
|
---|
86 | static const char AliasAttribute[]; //!< Attribute specifying an alias name.
|
---|
87 | static const char TargetAttribute[]; //!< Attribute specifying target for an alias.
|
---|
88 | static const char ResourceGroupAttribute[]; //!< Attribute specifying resource group for some loadable resource.
|
---|
89 |
|
---|
90 |
|
---|
91 | /*************************************************************************
|
---|
92 | Implementation Data
|
---|
93 | *************************************************************************/
|
---|
94 | Scheme* d_scheme; //!< Scheme object that we are helping to build
|
---|
95 | };
|
---|
96 |
|
---|
97 | } // End of CEGUI namespace section
|
---|
98 |
|
---|
99 | #endif // end of guard _CEGUIScheme_xmlHandler_h_
|
---|