source: GTP/trunk/App/Demos/Geom/OgreStuff/include/CEGUI/CEGUIXMLParser.h @ 1092

Revision 1092, 4.2 KB checked in by gumbau, 18 years ago (diff)

LodStrips? and LODTrees demos

Line 
1/************************************************************************
2    filename:   CEGUIXMLParser.h
3    created:    12/3/2005
4    author:     Paul D Turner
5*************************************************************************/
6/*************************************************************************
7    Crazy Eddie's GUI System (http://www.cegui.org.uk)
8    Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
9 
10    This library is free software; you can redistribute it and/or
11    modify it under the terms of the GNU Lesser General Public
12    License as published by the Free Software Foundation; either
13    version 2.1 of the License, or (at your option) any later version.
14 
15    This library is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18    Lesser General Public License for more details.
19 
20    You should have received a copy of the GNU Lesser General Public
21    License along with this library; if not, write to the Free Software
22    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23*************************************************************************/
24#ifndef _CEGUIXMLParser_h_
25#define _CEGUIXMLParser_h_
26
27#include "CEGUIBase.h"
28
29// Start of CEGUI namespace section
30namespace CEGUI
31{
32    /*!
33    \brief
34        This is an abstract class that is used by CEGUI to interface with XML parser libraries.
35     */
36    class CEGUIEXPORT XMLParser
37    {
38    public:
39        /*!
40        \brief
41            XMLParser base class constructor.
42         */
43        XMLParser(void);
44
45        /*!
46        \brief
47            XMLParser base class destructor.
48         */
49        virtual ~XMLParser(void);
50
51        /*!
52        \brief
53            Initialises the XMLParser module ready for use.
54
55            Note that this calls the protected abstract method 'initialiseImpl', which should
56            be provided in your implementation to perform any required initialisation.
57
58        \return
59            - true if the module initialised successfully.
60            - false if the module initialisation failed.
61         */
62        bool initialise(void);
63
64        /*!
65        \brief
66            Cleans up the XMLParser module after use.
67
68            Note that this calls the protected abstract method 'cleanupImpl', which should
69            be provided in your implementation to perform any required cleanup.
70
71        \return
72            Nothing.
73         */
74        void cleanup(void);
75
76        /*!
77        \brief
78            abstract method which initiates parsing of an XML file.
79
80        \param handler
81            XMLHandler based object which will process the XML elements.
82
83        \param filename
84            String object holding the filename of the XML file to be parsed.
85
86        \param schemaName
87            String object holding the name of the XML schema file to use for validating the XML.
88            Note that whether this is used or not is dependant upon the XMLParser in use.
89
90        \param resourceGroup
91            String object holding the resource group identifier which will be passed to the
92            ResourceProvider when loading the XML and schema files.
93
94        \return
95            Nothing.
96         */
97        virtual void parseXMLFile(XMLHandler& handler, const String& filename, const String& schemaName, const String& resourceGroup) = 0;
98
99    protected:
100        /*!
101        \brief
102            abstract method which initialises the XMLParser ready for use.
103
104        \return
105            - true if the module initialised successfully.
106            - false if the module initialisation failed.
107         */
108        virtual bool initialiseImpl(void) = 0;
109
110        /*!
111        \brief
112            abstract method which cleans up the XMLParser after use.
113
114        \return
115            Nothing.
116         */
117
118        virtual void cleanupImpl(void) = 0;
119
120    private:
121        bool d_initialised;     //!< true if the parser module has been initialised,
122    };
123
124} // End of  CEGUI namespace section
125
126
127#endif  // end of guard _CEGUIXMLParser_h_
Note: See TracBrowser for help on using the repository browser.