summaryrefslogtreecommitdiffstats
blob: 6662b98b519e61ae4bd1ee225e96a9187181421f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#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;
				}
			}
	};
}

#endif