diff options
Diffstat (limited to 'Swiften/Parser/AttributeMap.h')
m--------- | Swiften | 0 | ||||
-rw-r--r-- | Swiften/Parser/AttributeMap.h | 35 |
2 files changed, 0 insertions, 35 deletions
diff --git a/Swiften b/Swiften new file mode 160000 +Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c diff --git a/Swiften/Parser/AttributeMap.h b/Swiften/Parser/AttributeMap.h deleted file mode 100644 index 82c839a..0000000 --- a/Swiften/Parser/AttributeMap.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef ATTRIBUTEMAP_H -#define ATTRIBUTEMAP_H - -#include <map> - -#include "Swiften/Base/String.h" - -namespace Swift { - class AttributeMap : public std::map<String,String> { - public: - AttributeMap() {} - - String getAttribute(const String& attribute) const { - AttributeMap::const_iterator i = find(attribute); - if (i == end()) { - return ""; - } - else { - return i->second; - } - } - - bool getBoolAttribute(const String& attribute, bool defaultValue = false) const { - AttributeMap::const_iterator i = find(attribute); - if (i == end()) { - return defaultValue; - } - else { - return i->second == "true" || i->second == "1"; - } - } - }; -} - -#endif |