~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/src/config/sfl_config.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-01-07 14:51:16 UTC
  • mfrom: (4.3.5 sid)
  • Revision ID: package-import@ubuntu.com-20150107145116-yxnafinf4lrdvrmx
Tags: 1.4.1-0.1ubuntu1
* Merge with Debian, remaining changes:
 - Drop soprano, nepomuk build-dep
* Drop ubuntu patches, now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
static const char * const TRUE_STR = "true";
47
47
static const char * const FALSE_STR = "false";
48
48
 
49
 
class ConfigTreeItem;
 
49
class ConfigTreeItem {
 
50
 
 
51
    public:
 
52
        ConfigTreeItem() : name_(""), value_(""), defaultValue_(""), type_("string") {}
 
53
 
 
54
        // defaultvalue = value
 
55
        ConfigTreeItem(const std::string& name, const std::string& value, const std::string& type) :
 
56
            name_(name), value_(value),
 
57
            defaultValue_(value), type_(type) {}
 
58
 
 
59
        ConfigTreeItem(const std::string& name, const std::string& value, const std::string& defaultValue, const std::string& type) :
 
60
            name_(name), value_(value),
 
61
            defaultValue_(defaultValue), type_(type) {}
 
62
 
 
63
        void setValue(const std::string& value) {
 
64
            value_ = value;
 
65
        }
 
66
 
 
67
        std::string getName() const {
 
68
            return name_;
 
69
        }
 
70
 
 
71
        std::string getValue() const  {
 
72
            return value_;
 
73
        }
 
74
 
 
75
        std::string getDefaultValue() const  {
 
76
            return defaultValue_;
 
77
        }
 
78
 
 
79
        std::string getType() const  {
 
80
            return type_;
 
81
        }
 
82
 
 
83
    private:
 
84
        std::string name_;
 
85
        std::string value_;
 
86
        std::string defaultValue_;
 
87
        std::string type_;
 
88
};
 
89
 
 
90
 
 
91
 
50
92
typedef std::map<std::string, ConfigTreeItem> ItemMap;
51
93
typedef std::map<std::string, ItemMap> SectionMap;
52
94
 
152
194
        NON_COPYABLE(ConfigTree);
153
195
};
154
196
 
155
 
class ConfigTreeItem {
156
 
 
157
 
    public:
158
 
        ConfigTreeItem() : name_(""), value_(""), defaultValue_(""), type_("string") {}
159
 
 
160
 
        // defaultvalue = value
161
 
        ConfigTreeItem(const std::string& name, const std::string& value, const std::string& type) :
162
 
            name_(name), value_(value),
163
 
            defaultValue_(value), type_(type) {}
164
 
 
165
 
        ConfigTreeItem(const std::string& name, const std::string& value, const std::string& defaultValue, const std::string& type) :
166
 
            name_(name), value_(value),
167
 
            defaultValue_(defaultValue), type_(type) {}
168
 
 
169
 
        void setValue(const std::string& value) {
170
 
            value_ = value;
171
 
        }
172
 
 
173
 
        std::string getName() const {
174
 
            return name_;
175
 
        }
176
 
 
177
 
        std::string getValue() const  {
178
 
            return value_;
179
 
        }
180
 
 
181
 
        std::string getDefaultValue() const  {
182
 
            return defaultValue_;
183
 
        }
184
 
 
185
 
        std::string getType() const  {
186
 
            return type_;
187
 
        }
188
 
 
189
 
    private:
190
 
        std::string name_;
191
 
        std::string value_;
192
 
        std::string defaultValue_;
193
 
        std::string type_;
194
 
};
195
 
 
196
197
} // end namespace ConfigTree
197
198
 
198
199
#endif // __CONFIG_CONFIG_H__