Lines Matching refs:string
62 explicit ConfigParser(std::string&& content) in ConfigParser()
73 int next_token(std::string* name, std::string* value, std::string* error_msg) { in next_token()
74 std::string line; in next_token()
90 if (found_assign != std::string::npos && found_append == std::string::npos) { in next_token()
96 if (found_append != std::string::npos) { in next_token()
102 *error_msg = std::string("invalid format: ") + in next_token()
119 bool NextLine(std::string* line) { in NextLine()
120 if (p_ == std::string::npos) { in NextLine()
125 if (found != std::string::npos) { in NextLine()
130 p_ = std::string::npos; in NextLine()
137 std::string content_;
149 PropertyValue(std::string&& value, size_t lineno) in PropertyValue()
152 const std::string& value() const { in value()
156 void append_value(std::string&& value) { in append_value()
169 std::string value_;
173 static std::string create_error_msg(const char* file, in create_error_msg()
175 const std::string& msg) { in create_error_msg()
179 return std::string(buf); in create_error_msg()
184 std::unordered_map<std::string, PropertyValue>* properties, in parse_config_file() argument
185 std::string* error_msg) { in parse_config_file()
186 std::string content; in parse_config_file()
189 *error_msg = std::string("error reading file \"") + in parse_config_file()
197 std::string section_name; in parse_config_file()
200 std::string name; in parse_config_file()
201 std::string value; in parse_config_file()
202 std::string error; in parse_config_file()
241 std::string resolved_path; in parse_config_file()
276 std::string name; in parse_config_file()
277 std::string value; in parse_config_file()
278 std::string error; in parse_config_file()
289 std::string("section \"") + section_name + "\" not found"); in parse_config_file()
296 std::string name; in parse_config_file()
297 std::string value; in parse_config_file()
298 std::string error; in parse_config_file()
361 explicit Properties(std::unordered_map<std::string, PropertyValue>&& properties) in Properties() argument
364 std::vector<std::string> get_strings(const std::string& name, size_t* lineno = nullptr) const { in get_strings()
368 return std::vector<std::string>(); in get_strings()
371 std::vector<std::string> strings = android::base::Split(it->second.value(), ","); in get_strings()
380 bool get_bool(const std::string& name, size_t* lineno = nullptr) const { in get_bool()
389 std::string get_string(const std::string& name, size_t* lineno = nullptr) const { in get_string()
394 …std::vector<std::string> get_paths(const std::string& name, bool resolve, size_t* lineno = nullptr… in get_paths()
395 std::string paths_str = get_string(name, lineno); in get_paths()
397 std::vector<std::string> paths; in get_paths()
400 std::vector<std::pair<std::string, std::string>> params; in get_paths()
408 static std::string vndk_ver = Config::get_vndk_version_string('-'); in get_paths()
410 static std::string vndk_apex_ver = Config::get_vndk_version_string('v'); in get_paths()
418 std::vector<std::string> resolved_paths; in get_paths()
447 std::unordered_map<std::string, PropertyValue>::const_iterator
448 find_property(const std::string& name, size_t* lineno) const { in find_property()
456 std::unordered_map<std::string, PropertyValue> properties_;
457 std::unordered_map<std::string, std::string> resolved_paths_;
468 std::string* error_msg) { in read_binary_config()
471 std::unordered_map<std::string, PropertyValue> property_map; in read_binary_config()
480 std::unordered_map<std::string, NamespaceConfig*> namespace_configs; in read_binary_config()
484 …std::vector<std::string> additional_namespaces = properties.get_strings(kPropertyAdditionalNamespa… in read_binary_config()
492 std::string version_file = dirname(binary_realpath) + "/.version"; in read_binary_config()
493 std::string content; in read_binary_config()
496 *error_msg = std::string("error reading version file \"") + in read_binary_config()
510 *error_msg = std::string("invalid version \"") + version_file + "\": \"" + content +"\""; in read_binary_config()
522 std::string property_name_prefix = std::string("namespace.") + name; in read_binary_config()
525 std::vector<std::string> linked_namespaces = in read_binary_config()
532 std::string("undefined namespace: ") + linked_ns_name); in read_binary_config()
539 std::string shared_libs = properties.get_string(property_name_prefix + in read_binary_config()
547 std::string("list of shared_libs for ") + in read_binary_config()
557 std::string("both shared_libs and allow_all_shared_libs " in read_binary_config()
569 std::string allowed_libs = in read_binary_config()
571 const std::string libs = properties.get_string(property_name_prefix + ".allowed_libs", &lineno); in read_binary_config()
606 std::string Config::get_vndk_version_string(const char delimiter) { in get_vndk_version_string()
607 std::string version = android::base::GetProperty("ro.vndk.version", ""); in get_vndk_version_string()
615 NamespaceConfig* Config::create_namespace_config(const std::string& name) { in create_namespace_config()