Lines Matching refs:string
44 #include <string>
60 explicit ConfigParser(std::string&& content)
71 int next_token(std::string* name, std::string* value, std::string* error_msg) {
72 std::string line;
88 if (found_assign != std::string::npos && found_append == std::string::npos) {
94 if (found_append != std::string::npos) {
100 *error_msg = std::string("invalid format: ") +
117 bool NextLine(std::string* line) {
118 if (p_ == std::string::npos) {
123 if (found != std::string::npos) {
128 p_ = std::string::npos;
135 std::string content_;
147 PropertyValue(std::string&& value, size_t lineno)
150 const std::string& value() const {
154 void append_value(std::string&& value) {
167 std::string value_;
171 static std::string create_error_msg(const char* file,
173 const std::string& msg) {
177 return std::string(buf);
182 std::unordered_map<std::string, PropertyValue>* properties,
183 std::string* error_msg) {
184 std::string content;
187 *error_msg = std::string("error reading file \"") +
195 std::string section_name;
198 std::string name;
199 std::string value;
200 std::string error;
246 std::string name;
247 std::string value;
248 std::string error;
259 std::string("section \"") + section_name + "\" not found");
266 std::string name;
267 std::string value;
268 std::string error;
334 explicit Properties(std::unordered_map<std::string, PropertyValue>&& properties)
337 std::vector<std::string> get_strings(const std::string& name, size_t* lineno = nullptr) const {
341 return std::vector<std::string>();
344 std::vector<std::string> strings = android::base::Split(it->second.value(), ",");
353 bool get_bool(const std::string& name, size_t* lineno = nullptr) const {
362 std::string get_string(const std::string& name, size_t* lineno = nullptr) const {
367 std::vector<std::string> get_paths(const std::string& name, bool resolve, size_t* lineno = nullptr) {
368 std::string paths_str = get_string(name, lineno);
370 std::vector<std::string> paths;
373 std::vector<std::pair<std::string, std::string>> params;
381 static std::string vndk = Config::get_vndk_version_string('-');
389 std::vector<std::string> resolved_paths;
405 std::unordered_map<std::string, PropertyValue>::const_iterator
406 find_property(const std::string& name, size_t* lineno) const {
414 std::unordered_map<std::string, PropertyValue> properties_;
424 std::string* error_msg) {
427 std::unordered_map<std::string, PropertyValue> property_map;
436 std::unordered_map<std::string, NamespaceConfig*> namespace_configs;
440 std::vector<std::string> additional_namespaces = properties.get_strings(kPropertyAdditionalNamespaces);
448 std::string version_file = dirname(binary_realpath) + "/.version";
449 std::string content;
452 *error_msg = std::string("error reading version file \"") +
466 *error_msg = std::string("invalid version \"") + version_file + "\": \"" + content +"\"";
478 std::string property_name_prefix = std::string("namespace.") + name;
481 std::vector<std::string> linked_namespaces =
488 std::string("undefined namespace: ") + linked_ns_name);
495 std::string shared_libs = properties.get_string(property_name_prefix +
503 std::string("list of shared_libs for ") +
513 std::string("both shared_libs and allow_all_shared_libs "
549 std::string Config::get_vndk_version_string(const char delimiter) {
550 std::string version = android::base::GetProperty("ro.vndk.version", "");
552 //add the delimiter char in front of the string and return it.
558 NamespaceConfig* Config::create_namespace_config(const std::string& name) {