* renamed *Value classes to *Option (GConfStringValue, GConfBooleanValue, GConfInteg...
authormishas <mikhail.sobolev@gmail.com>
Thu, 12 Apr 2007 08:37:29 +0000 (08:37 +0000)
committermishas <mikhail.sobolev@gmail.com>
Thu, 12 Apr 2007 08:37:29 +0000 (08:37 +0000)
 * added 'const' qualifier to members that hold default values

git-svn-id: file:///svnroot/simple-launcher/trunk@172 3ba93dab-e023-0410-b42a-de7732cf370a

gconf-wrapper.cc
gconf-wrapper.h

index 37a573e..233563a 100644 (file)
@@ -94,12 +94,12 @@ void GConfOption::unsetGConfValue() {
   }
 }
 
-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();
 
@@ -117,7 +117,7 @@ const std::string& GConfStringValue::value() const {
   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;
 
@@ -139,12 +139,12 @@ const std::string& GConfStringValue::setValue(const std::string& 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();
 
@@ -162,7 +162,7 @@ bool GConfBooleanValue::value() const {
   return myValue;
 }
 
-bool GConfBooleanValue::setValue(bool newValue) {
+bool GConfBooleanOption::setValue(bool newValue) {
   if (!myIsSynchronized || (myValue != newValue)) {
     myValue = newValue;
 
@@ -184,12 +184,12 @@ bool GConfBooleanValue::setValue(bool 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();
 
@@ -207,7 +207,7 @@ int GConfIntegerValue::value() const {
   return myValue;
 }
 
-int GConfIntegerValue::setValue(int newValue) {
+int GConfIntegerOption::setValue(int newValue) {
   if (!myIsSynchronized || (myValue != newValue)) {
     myValue = newValue;
 
index ab52c5a..2457157 100644 (file)
@@ -66,40 +66,40 @@ protected:
   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