protected:
GConfItem(); // I do not want to create instances of this class
- static void validateClient();
+ static void allocateClient();
protected:
+ // TODO: should I count the references and unref the client when the last user is gone??
static GConfClient *ourClient;
};
const std::string& path() const { return myKeyPath; }
- static std::string mergePath(const std::string&, const std::string);
+ std::string merge(const std::string&) const;
private:
- std::string myKeyPath;
+ const std::string myKeyPath;
};
class GConfOption : public GConfItem {
protected:
- GConfOption(const GConfKey& key, const std::string& path): myIsSynchronized(false), myPath(GConfKey::mergePath(key.path(), path)) { }
+ GConfOption(const GConfKey& key, const std::string& path): myIsSynchronized(false), myPath(key.merge(path)) { }
void setGConfValue(const GConfValue *);
GConfValue *getGConfValue(GConfValueType) const;
class GConfStringValue : public GConfOption {
public:
GConfStringValue(const GConfKey&, const std::string&, const std::string& = "");
- ~GConfStringValue();
const std::string& value() const;
const std::string& setValue(const std::string& newValue);
class GConfBooleanValue : public GConfOption {
public:
GConfBooleanValue(const GConfKey&, const std::string&, bool = false);
- ~GConfBooleanValue();
bool value() const;
bool setValue(bool newValue);
class GConfIntegerValue : public GConfOption {
public:
GConfIntegerValue(const GConfKey&, const std::string&, int = false);
- ~GConfIntegerValue();
int value() const;
int setValue(int newValue);