• Home
  • Raw
  • Download

Lines Matching refs:s

34 std::vector<std::string> SplitString(const std::string &s, char c) {  in SplitString()  argument
39 while ((matchPos = s.find(c, startPos)) != std::string::npos) { in SplitString()
40 components.push_back(s.substr(startPos, matchPos - startPos)); in SplitString()
44 if (startPos <= s.length()) { in SplitString()
45 components.push_back(s.substr(startPos)); in SplitString()
64 bool parse(const std::string &s, std::vector<T> *objs) { in parse() argument
65 std::vector<std::string> v = SplitString(s, ','); in parse()
79 bool parseEnum(const std::string &s, E *e, const Array &strings) { in parseEnum() argument
81 if (s == strings.at(i)) { in parseEnum()
90 bool parse(const std::string &s, ENUM *hf) { \
91 return parseEnum(s, hf, g##ENUM##Strings); \
119 bool parse(const std::string& s, Level* l) { in parse() argument
120 if (s.empty()) { in parse()
124 if (s == "legacy") { in parse()
129 if (!ParseUint(s, &value)) { in parse()
152 bool parseKernelConfigIntHelper(const std::string &s, T *i) { in parseKernelConfigIntHelper() argument
155 unsigned long long int ulli = strtoull(s.c_str(), &end, 0 /* base */); in parseKernelConfigIntHelper()
158 if (errno == 0 && s.c_str() != end && *end == '\0') { in parseKernelConfigIntHelper()
165 bool parseKernelConfigInt(const std::string &s, int64_t *i) { in parseKernelConfigInt() argument
166 return parseKernelConfigIntHelper(s, i); in parseKernelConfigInt()
169 bool parseKernelConfigInt(const std::string &s, uint64_t *i) { in parseKernelConfigInt() argument
170 return parseKernelConfigIntHelper(s, i); in parseKernelConfigInt()
173 bool parseRange(const std::string &s, KernelConfigRangeValue *range) { in parseRange() argument
174 auto pos = s.find('-'); in parseRange()
178 return parseKernelConfigInt(s.substr(0, pos), &range->first) in parseRange()
179 && parseKernelConfigInt(s.substr(pos + 1), &range->second); in parseRange()
182 bool parse(const std::string &s, KernelConfigKey *key) { in parse() argument
183 *key = s; in parse()
187 bool parseKernelConfigValue(const std::string &s, KernelConfigTypedValue *kctv) { in parseKernelConfigValue() argument
190 kctv->mStringValue = s; in parseKernelConfigValue()
193 return parseKernelConfigInt(s, &kctv->mIntegerValue); in parseKernelConfigValue()
195 return parseRange(s, &kctv->mRangeValue); in parseKernelConfigValue()
197 return parse(s, &kctv->mTristateValue); in parseKernelConfigValue()
201 bool parseKernelConfigTypedValue(const std::string& s, KernelConfigTypedValue* kctv) { in parseKernelConfigTypedValue() argument
202 if (s.size() > 1 && s[0] == '"' && s.back() == '"') { in parseKernelConfigTypedValue()
204 kctv->mStringValue = s.substr(1, s.size()-2); in parseKernelConfigTypedValue()
207 if (parseKernelConfigInt(s, &kctv->mIntegerValue)) { in parseKernelConfigTypedValue()
211 if (parse(s, &kctv->mTristateValue)) { in parseKernelConfigTypedValue()
219 bool parse(const std::string &s, Version *ver) { in parse() argument
220 std::vector<std::string> v = SplitString(s, '.'); in parse()
242 const std::string& s, VersionRange* vr, in parseVersionRange() argument
244 std::vector<std::string> v = SplitString(s, '-'); in parseVersionRange()
264 bool parse(const std::string& s, VersionRange* vr) { in parse() argument
266 return parseVersionRange(s, vr, versionParser); in parse()
278 bool parse(const std::string &s, VndkVersionRange *vr) { in parse() argument
279 std::vector<std::string> v = SplitString(s, '-'); in parse()
309 bool parse(const std::string &s, KernelVersion *kernelVersion) { in parse() argument
310 std::vector<std::string> v = SplitString(s, '.'); in parse()
344 std::string s; in expandInstances() local
347 if (count > 0) s += " AND "; in expandInstances()
352 s += toFQNameString(matrixInstance.interface(), instance) + " (@" + in expandInstances()
358 s += toFQNameString(vr, matrixInstance.interface(), instance); in expandInstances()
365 s += "@" + to_string(vr); in expandInstances()
368 s = "(" + s + ")"; in expandInstances()
370 return s; in expandInstances()
395 bool parse(const std::string &s, KernelSepolicyVersion *ksv){ in parse() argument
396 return ParseUint(s, &ksv->value); in parse()
478 bool parse(const std::string& s, FqInstance* fqInstance) { in parse() argument
479 return fqInstance->setTo(s); in parse()
495 bool parseAidlVersion(const std::string& s, Version* version) { in parseAidlVersion() argument
497 return android::base::ParseUint(s, &version->minorVer); in parseAidlVersion()
507 bool parseAidlVersionRange(const std::string& s, VersionRange* vr) { in parseAidlVersionRange() argument
508 return parseVersionRange(s, vr, parseAidlVersion); in parseAidlVersionRange()