diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-09-11 02:15:13 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-09-11 02:15:13 +0200 |
commit | 36a3a590ffa4133f7f2d980a57d48ef95c680b71 (patch) | |
tree | 47a5f37f571db0918fe3f48bb14c819d01e13777 /src/Common/XmlData.h | |
parent | f540560feb093143569f8a85eb5280d9c7504a0e (diff) | |
download | mad-36a3a590ffa4133f7f2d980a57d48ef95c680b71.tar mad-36a3a590ffa4133f7f2d980a57d48ef95c680b71.zip |
Extended StorageManager
Diffstat (limited to 'src/Common/XmlData.h')
-rw-r--r-- | src/Common/XmlData.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Common/XmlData.h b/src/Common/XmlData.h index 51e5327..b7e8ec1 100644 --- a/src/Common/XmlData.h +++ b/src/Common/XmlData.h @@ -26,6 +26,7 @@ #include <Core/Exception.h> #include <map> +#include <set> #include <string> #include <sstream> #include <vector> @@ -283,6 +284,24 @@ class MAD_COMMON_EXPORT XmlData { return; } + + std::set<std::string> getChildren() const { + std::set<std::string> childNames; + + for(std::map<std::string, Element*>::const_iterator it = elements.begin(); it != elements.end(); ++it) + childNames.insert(it->first); + + return childNames; + } + + std::set<std::string> getLists() const { + std::set<std::string> listNames; + + for(std::map<std::string, List*>::const_iterator it = lists.begin(); it != lists.end(); ++it) + listNames.insert(it->first); + + return listNames; + } }; class MAD_COMMON_EXPORT List : private boost::noncopyable { |