summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/Attribute.h')
-rw-r--r--Swiften/Parser/Attribute.h56
1 files changed, 32 insertions, 24 deletions
diff --git a/Swiften/Parser/Attribute.h b/Swiften/Parser/Attribute.h
index f1f9a83..07e63b4 100644
--- a/Swiften/Parser/Attribute.h
+++ b/Swiften/Parser/Attribute.h
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2010 Remko Tronçon
- * Licensed under the GNU General Public License v3.
- * See Documentation/Licenses/GPLv3.txt for more information.
+ * Copyright (c) 2010 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
*/
#pragma once
@@ -9,25 +9,33 @@
#include <string>
namespace Swift {
- class Attribute {
- public:
- Attribute(const std::string& name, const std::string& ns) : name(name), ns(ns) {
- }
-
- const std::string& getName() const {
- return name;
- }
-
- const std::string& getNamespace() const {
- return ns;
- }
-
- bool operator==(const Attribute& o) const {
- return o.name == name && o.ns == ns;
- }
-
- private:
- std::string name;
- std::string ns;
- };
+ class Attribute {
+ public:
+ Attribute(const std::string& name, const std::string& ns) : name(name), ns(ns) {
+ }
+
+ Attribute(const std::string& name, const std::string& ns, const std::string& prefix) : name(name), ns(ns), prefix(prefix) {
+ }
+
+ const std::string& getName() const {
+ return name;
+ }
+
+ const std::string& getNamespace() const {
+ return ns;
+ }
+
+ const std::string& getPrefix() const {
+ return prefix;
+ }
+
+ bool operator==(const Attribute& o) const {
+ return o.name == name && o.ns == ns;
+ }
+
+ private:
+ std::string name;
+ std::string ns;
+ std::string prefix;
+ };
}