}
}
-GConfStringValue::GConfStringValue(const GConfKey& key, const std::string& name, const std::string& defaultValue):
+GConfStringOption::GConfStringOption(const GConfKey& key, const std::string& name, const std::string& defaultValue):
GConfOption(GCONF_VALUE_STRING, key, name),
myDefaultValue(defaultValue) {
}
-const std::string& GConfStringValue::value() const {
+const std::string& GConfStringOption::value() const {
if (!myIsSynchronized) {
GConfValue *value = getGConfValue();
return myValue;
}
-const std::string& GConfStringValue::setValue(const std::string& newValue) {
+const std::string& GConfStringOption::setValue(const std::string& newValue) {
if (!myIsSynchronized || (myValue != newValue)) {
myValue = newValue;
return myValue;
}
-GConfBooleanValue::GConfBooleanValue(const GConfKey& key, const std::string& name, bool defaultValue):
+GConfBooleanOption::GConfBooleanOption(const GConfKey& key, const std::string& name, bool defaultValue):
GConfOption(GCONF_VALUE_BOOL, key, name),
myDefaultValue(defaultValue) {
}
-bool GConfBooleanValue::value() const {
+bool GConfBooleanOption::value() const {
if (!myIsSynchronized) {
GConfValue *value = getGConfValue();
return myValue;
}
-bool GConfBooleanValue::setValue(bool newValue) {
+bool GConfBooleanOption::setValue(bool newValue) {
if (!myIsSynchronized || (myValue != newValue)) {
myValue = newValue;
return myValue;
}
-GConfIntegerValue::GConfIntegerValue(const GConfKey& key, const std::string& name, int defaultValue):
+GConfIntegerOption::GConfIntegerOption(const GConfKey& key, const std::string& name, int defaultValue):
GConfOption(GCONF_VALUE_INT, key, name),
myDefaultValue(defaultValue) {
}
-int GConfIntegerValue::value() const {
+int GConfIntegerOption::value() const {
if (!myIsSynchronized) {
GConfValue *value = getGConfValue();
return myValue;
}
-int GConfIntegerValue::setValue(int newValue) {
+int GConfIntegerOption::setValue(int newValue) {
if (!myIsSynchronized || (myValue != newValue)) {
myValue = newValue;
const std::string myPath;
};
-class GConfStringValue : public GConfOption {
+class GConfStringOption : public GConfOption {
public:
- GConfStringValue(const GConfKey&, const std::string&, const std::string& = "");
+ GConfStringOption(const GConfKey&, const std::string&, const std::string& = "");
const std::string& value() const;
const std::string& setValue(const std::string& newValue);
private:
mutable std::string myValue;
- std::string myDefaultValue;
+ const std::string myDefaultValue;
};
-class GConfBooleanValue : public GConfOption {
+class GConfBooleanOption : public GConfOption {
public:
- GConfBooleanValue(const GConfKey&, const std::string&, bool = false);
+ GConfBooleanOption(const GConfKey&, const std::string&, bool = false);
bool value() const;
bool setValue(bool newValue);
private:
mutable bool myValue;
- bool myDefaultValue;
+ const bool myDefaultValue;
};
-class GConfIntegerValue : public GConfOption {
+class GConfIntegerOption : public GConfOption {
public:
- GConfIntegerValue(const GConfKey&, const std::string&, int = false);
+ GConfIntegerOption(const GConfKey&, const std::string&, int = false);
int value() const;
int setValue(int newValue);
private:
mutable int myValue;
- int myDefaultValue;
+ const int myDefaultValue;
};
#endif