Lines Matching refs:key
41 void set(const char *key, const char *value);
42 void set(const char *key, int value);
43 void setFloat(const char *key, float value);
44 // Look up string value by key.
45 // -- The string remains valid until the next set/remove of the same key,
47 const char *get(const char *key) const;
48 int getInt(const char *key) const;
49 float getFloat(const char *key) const;
58 // * NAME_NOT_FOUND - if either key has not been set previously
64 void remove(const char *key);
119 ssize_t add(const KeyT& key, const ValueT& value) {
120 return mList.add(Pair(key, value));
135 const ValueT& valueFor(const KeyT& key) const {
136 ssize_t i = indexOfKey(key);
137 LOG_ALWAYS_FATAL_IF(i<0, "%s: key not found", __PRETTY_FUNCTION__);
142 ssize_t indexOfKey(const KeyT& key) const {
145 if (mList[vectorIdx].mKey == key) {
153 ssize_t removeItem(const KeyT& key) {
154 size_t vectorIdx = (size_t) indexOfKey(key);
167 // Same as removing and re-adding. The key's index changes to max.
168 ssize_t replaceValueFor(const KeyT& key, const ValueT& value) {
169 removeItem(key);
170 return add(key, value);
177 Pair(const KeyT& key, const ValueT& value) :
178 mKey(key),
190 * If two keys have meaning that conflict, then the later-set key