ScummVM API documentation
te_name_val_xml_parser.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef TETRAEDGE_TE_TE_NAME_VAL_XML_PARSER_H
23#define TETRAEDGE_TE_TE_NAME_VAL_XML_PARSER_H
24
25#include "common/formats/xmlparser.h"
26
27namespace Tetraedge {
28
30public:
31 // Parser
32 CUSTOM_XML_PARSER(TeNameValXmlParser) {
33 XML_KEY(value)
34 XML_PROP(name, true)
35 XML_PROP(value, true)
36 KEY_END()
37 XML_KEY(group)
38 XML_PROP(name, true)
39 XML_KEY(value)
40 XML_PROP(name, true)
41 XML_PROP(value, true)
42 KEY_END()
43 KEY_END()
44
45 } PARSER_END()
46
47 // Parser callback methods
48 bool parserCallback_value(ParserNode *node);
49 bool parserCallback_group(ParserNode *node);
50 virtual bool closedKeyCallback(ParserNode *node) override;
51
52public:
53 const Common::StringMap &getMap() const { return _map; }
54
55private:
57 Common::String _curGroup;
59};
60} // end namespace Tetraedge
61
62#endif // TETRAEDGE_TE_TE_NAME_VAL_XML_PARSER_H
Definition: str.h:59
Definition: xmlparser.h:98
Definition: te_name_val_xml_parser.h:29
virtual bool closedKeyCallback(ParserNode *node) override
Definition: xmlparser.h:145