56
56
Option(const Option& option);
57
57
Option& operator=(const Option& option);
59
void put(const Pref* pref, const std::string& value);
59
void put(PrefPtr pref, const std::string& value);
60
60
// Returns true if name is defined. Otherwise returns false. Note
61
61
// that even if the value is a empty string, this method returns
62
62
// true. If option is not defined in this object and parent_ is not
63
63
// NULL, lookup parent_ to check |pref| is defined.
64
bool defined(const Pref* pref) const;
64
bool defined(PrefPtr pref) const;
65
65
// Just like defined(), but this function does not lookup parent_.
66
bool definedLocal(const Pref* pref) const;
66
bool definedLocal(PrefPtr pref) const;
67
67
// Returns true if name is not defined or the value is a empty string.
68
68
// Otherwise returns false.
69
bool blank(const Pref* pref) const;
69
bool blank(PrefPtr pref) const;
70
70
// Returns option value for |pref|. If the |pref| is not defined in
71
71
// this object, parent_ is looked up.
72
const std::string& get(const Pref* pref) const;
73
int32_t getAsInt(const Pref* pref) const;
74
int64_t getAsLLInt(const Pref* pref) const;
75
bool getAsBool(const Pref* pref) const;
76
double getAsDouble(const Pref* pref) const;
72
const std::string& get(PrefPtr pref) const;
73
int32_t getAsInt(PrefPtr pref) const;
74
int64_t getAsLLInt(PrefPtr pref) const;
75
bool getAsBool(PrefPtr pref) const;
76
double getAsDouble(PrefPtr pref) const;
77
77
// Removes |pref| from this object. This function does not modify
79
void remove(const Pref* pref);
79
void remove(PrefPtr pref);
80
80
// Removes all option values from this object. This function does
81
81
// not modify parent_.