Lines Matching refs:std

35 using TagList = std::vector<std::string>;
38 std::string name;
42 using SymbolList = std::vector<SymbolEnt>;
45 std::string name;
46 std::string base;
53 SymbolFileParser(const std::string& path, const CompilationType& type) in SymbolFileParser()
58 file(path, std::ios_base::in), in SymbolFileParser()
63 std::optional<SymbolMap> parse() { in parse()
65 return std::nullopt; in parse()
72 return std::nullopt; in parse()
83 return std::make_optional(std::move(symbol_map)); in parse()
89 std::string line; in hasNextLine()
90 while (std::getline(file, line)) { in hasNextLine()
96 if (hash_pos != std::string::npos) { in hasNextLine()
108 static std::vector<std::string> parseTags(const std::string& tags_line) { in parseTags()
109 std::vector<std::string> tags = android::base::Split(tags_line, " \t"); in parseTags()
110 tags.erase(std::remove(tags.begin(), tags.end(), ""), tags.end()); in parseTags()
115 std::optional<Version> parseVersion() { in parseVersion()
118 std::string::size_type lparen_pos = curr_line.find('{'); in parseVersion()
119 if (lparen_pos == std::string::npos) { in parseVersion()
125 std::string name = android::base::Trim(curr_line.substr(0, lparen_pos)); in parseVersion()
126 TagList tags = std::move(curr_tags); in parseVersion()
134 if (rparen_pos != std::string::npos) { in parseVersion()
136 if (semicolon_pos == std::string::npos) { in parseVersion()
146 std::string base = android::base::Trim( in parseVersion()
149 return std::make_optional(Version{std::move(name), std::move(base), in parseVersion()
150 std::move(symbols), std::move(tags)}); in parseVersion()
163 if (colon_pos != std::string::npos) { in parseVersion()
164 std::string visibility = in parseVersion()
180 if (semicolon_pos == std::string::npos) { in parseVersion()
185 std::string symbol_name = in parseVersion()
189 if (asterisk_pos != std::string::npos) { in parseVersion()
194 symbols.push_back(SymbolEnt{std::move(symbol_name), in parseVersion()
195 std::move(curr_tags)}); in parseVersion()
217 std::optional<Arch> arch = arch_from_string(tag); in isInArch()
235 std::string api_level; in isInApi()
236 std::string intro; in isInApi()
238 for (const std::string& tag : tags) { in isInApi()
276 int parseApiLevelValue(const std::string& tag) const { in parseApiLevelValue()
277 std::string api_level = tag.substr(tag.find('=') + 1); in parseApiLevelValue()
282 if (api_level.find_first_not_of("0123456789") != std::string::npos) { in parseApiLevelValue()
286 return std::stoi(api_level); in parseApiLevelValue()
290 const std::string& file_path;
292 const std::string api_level_arch_prefix;
293 const std::string intro_arch_perfix;
295 std::ifstream file;
296 std::string curr_line;
297 std::vector<std::string> curr_tags;
304 std::optional<SymbolMap> parseSymbolFile(const std::string& file_path, in parseSymbolFile()