Lines Matching refs:keys
182 bool BatteryConfig::SplitKey(const std::string& key, std::vector<std::string>& keys) const in SplitKey()
184 SplitStr(TrimStr(key), ".", keys); in SplitKey()
185 return (keys.size() < MIN_DEPTH || keys.size() > MAX_DEPTH) ? false : true; in SplitKey()
190 std::vector<std::string> keys; in GetValue() local
191 if (!SplitKey(key, keys)) { in GetValue()
196 Json::Value value = FindConf(keys[MAP_KEY_INDEX]); in GetValue()
198 BATTERY_HILOGW(COMP_HDI, "Value is empty. key=%{public}s", keys[MAP_KEY_INDEX].c_str()); in GetValue()
202 for (size_t i = 1; i < keys.size(); ++i) { in GetValue()
203 if (!value.isObject() || !value.isMember(keys[i])) { in GetValue()
204 BATTERY_HILOGW(COMP_HDI, "The key is not configured. key=%{public}s", keys[i].c_str()); in GetValue()
207 value = value[keys[i]]; in GetValue()