Lines Matching refs:std

62   explicit ConfigParser(std::string&& content)  in ConfigParser()
63 : content_(std::move(content)), p_(0), lineno_(0), was_end_of_file_(false) {} 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()
150 : value_(std::move(value)), lineno_(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()
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()
195 ConfigParser cp(std::move(content)); 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()
314 (*properties)[name] = PropertyValue(std::move(value), cp.lineno()); in parse_config_file()
321 (*properties)[name] = PropertyValue(std::move(value), cp.lineno()); in parse_config_file()
326 (*properties)[name].append_value(std::move(value)); in parse_config_file()
331 (*properties)[name].append_value(std::move(value)); in parse_config_file()
360 explicit Properties(std::unordered_map<std::string, PropertyValue>&& properties) in Properties()
361 : properties_(std::move(properties)), target_sdk_version_(__ANDROID_API__) {} in Properties()
363 std::vector<std::string> get_strings(const std::string& name, size_t* lineno = nullptr) const { in get_strings()
367 return std::vector<std::string>(); in get_strings()
370 std::vector<std::string> strings = android::base::Split(it->second.value(), ","); in get_strings()
379 bool get_bool(const std::string& name, size_t* lineno = nullptr) const { in get_bool()
388 std::string get_string(const std::string& name, size_t* lineno = nullptr) const { in get_string()
393std::vector<std::string> get_paths(const std::string& name, bool resolve, size_t* lineno = nullptr… in get_paths()
394 std::string paths_str = get_string(name, lineno); in get_paths()
396 std::vector<std::string> paths; in get_paths()
399 std::vector<std::pair<std::string, std::string>> params; in get_paths()
407 static std::string vndk_ver = Config::get_vndk_version_string('-'); in get_paths()
409 static std::string vndk_apex_ver = Config::get_vndk_version_string('v'); in get_paths()
417 std::vector<std::string> resolved_paths; in get_paths()
446 std::unordered_map<std::string, PropertyValue>::const_iterator
447 find_property(const std::string& name, size_t* lineno) const { in find_property()
455 std::unordered_map<std::string, PropertyValue> properties_;
456 std::unordered_map<std::string, std::string> resolved_paths_;
466 std::string* error_msg) { in read_binary_config()
469 std::unordered_map<std::string, PropertyValue> property_map; in read_binary_config()
474 Properties properties(std::move(property_map)); in read_binary_config()
478 std::unordered_map<std::string, NamespaceConfig*> namespace_configs; in read_binary_config()
482std::vector<std::string> additional_namespaces = properties.get_strings(kPropertyAdditionalNamespa… in read_binary_config()
490 std::string version_file = dirname(binary_realpath) + "/.version"; in read_binary_config()
491 std::string content; in read_binary_config()
494 *error_msg = std::string("error reading version file \"") + in read_binary_config()
508 *error_msg = std::string("invalid version \"") + version_file + "\": \"" + content +"\""; in read_binary_config()
520 std::string property_name_prefix = std::string("namespace.") + name; in read_binary_config()
523 std::vector<std::string> linked_namespaces = in read_binary_config()
530 std::string("undefined namespace: ") + linked_ns_name); in read_binary_config()
537 std::string shared_libs = properties.get_string(property_name_prefix + in read_binary_config()
545 std::string("list of shared_libs for ") + in read_binary_config()
555 std::string("both shared_libs and allow_all_shared_libs " in read_binary_config()
567 std::string whitelisted = in read_binary_config()
597 std::string Config::get_vndk_version_string(const char delimiter) { in get_vndk_version_string()
598 std::string version = android::base::GetProperty("ro.vndk.version", ""); in get_vndk_version_string()
606 NamespaceConfig* Config::create_namespace_config(const std::string& name) { in create_namespace_config()
607 namespace_configs_.push_back(std::unique_ptr<NamespaceConfig>(new NamespaceConfig(name))); in create_namespace_config()