summaryrefslogtreecommitdiffstats
blob: 07e63b43799a85515e285d18bb08766007e1e9ff (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * Copyright (c) 2010 Isode Limited.
 * All rights reserved.
 * See the COPYING file for more information.
 */

#pragma once

#include <string>

namespace Swift {
    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;
    };
}