diff options
author | Vicent Marti | 2008-08-04 16:59:55 +0000 |
---|---|---|
committer | Vicent Marti | 2008-08-04 16:59:55 +0000 |
commit | 85c36885f5bbf2d47276c7702f1b8ccbf22ecc34 (patch) | |
tree | dd3aeb61b4bcc37431b383c36f429d082f418965 /common/xmlparser.h | |
parent | 461e2f42149e3b1914b3c7b392d076c186c6d0a1 (diff) | |
download | scummvm-rg350-85c36885f5bbf2d47276c7702f1b8ccbf22ecc34.tar.gz scummvm-rg350-85c36885f5bbf2d47276c7702f1b8ccbf22ecc34.tar.bz2 scummvm-rg350-85c36885f5bbf2d47276c7702f1b8ccbf22ecc34.zip |
Theme layout parsing. Work in progress.
svn-id: r33613
Diffstat (limited to 'common/xmlparser.h')
-rw-r--r-- | common/xmlparser.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/xmlparser.h b/common/xmlparser.h index 031ee2be14..0510ec0ab6 100644 --- a/common/xmlparser.h +++ b/common/xmlparser.h @@ -183,10 +183,16 @@ namespace Common { #define XML_KEY(keyName) {\ lay = new XMLKeyLayout; \ lay->anyProps = false; \ + lay->anyKeys = false; \ lay->custom = new kLocalParserName::CustomParserCallback; \ ((kLocalParserName::CustomParserCallback*)(lay->custom))->callback = (&kLocalParserName::parserCallback_##keyName); \ layout.top()->children[#keyName] = lay; \ layout.push(lay); + +#define XML_KEY_RECURSIVE(keyName) {\ + layout.top()->children[#keyName] = layout.top();\ + layout.push(layout.top());\ + } #define KEY_END() layout.pop(); } @@ -197,6 +203,9 @@ namespace Common { #define XML_PROP_ANY() {\ layout.top()->anyProps = true; } + +#define XML_KEY_ANY() {\ + layout.top()->anyKeys = true; } #define CUSTOM_XML_PARSER(parserName) \ protected: \ @@ -209,6 +218,8 @@ namespace Common { XMLKeyLayout *lay = 0; \ XMLKeyLayout::XMLKeyProperty prop; \ _XMLkeys = new XMLKeyLayout; \ + _XMLkeys->anyProps = false; \ + _XMLkeys->anyKeys = false; \ layout.push(_XMLkeys); #define PARSER_END() layout.clear(); } @@ -300,6 +311,7 @@ public: Common::List<XMLKeyProperty> properties; bool anyProps; + bool anyKeys; ChildMap children; ~XMLKeyLayout() { |