MCPcopy Create free account
hub / github.com/alibaba/MNN / GetIncludedFilesRecursive

Method GetIncludedFilesRecursive

3rd_party/flatbuffers/src/idl_parser.cpp:2622–2646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2620}
2621
2622std::set<std::string> Parser::GetIncludedFilesRecursive(
2623 const std::string &file_name) const {
2624 std::set<std::string> included_files;
2625 std::list<std::string> to_process;
2626
2627 if (file_name.empty()) return included_files;
2628 to_process.push_back(file_name);
2629
2630 while (!to_process.empty()) {
2631 std::string current = to_process.front();
2632 to_process.pop_front();
2633 included_files.insert(current);
2634
2635 // Workaround the lack of const accessor in C++98 maps.
2636 auto &new_files =
2637 (*const_cast<std::map<std::string, std::set<std::string>> *>(
2638 &files_included_per_file_))[current];
2639 for (auto it = new_files.begin(); it != new_files.end(); ++it) {
2640 if (included_files.find(*it) == included_files.end())
2641 to_process.push_back(*it);
2642 }
2643 }
2644
2645 return included_files;
2646}
2647
2648// Schema serialization functionality:
2649

Callers 7

TextMakeRuleFunction · 0.80
RustMakeRuleFunction · 0.80
CPPMakeRuleFunction · 0.80
GeneralMakeRuleFunction · 0.80
BinaryMakeRuleFunction · 0.80
JSTSMakeRuleFunction · 0.80
DartMakeRuleFunction · 0.80

Calls 7

emptyMethod · 0.45
push_backMethod · 0.45
frontMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected