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

Method GenIncludeDependencies

3rd_party/flatbuffers/src/idl_gen_cpp.cpp:203–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201 }
202
203 void GenIncludeDependencies() {
204 int num_includes = 0;
205 for (auto it = parser_.native_included_files_.begin();
206 it != parser_.native_included_files_.end(); ++it) {
207 code_ += "#include \"" + *it + "\"";
208 num_includes++;
209 }
210 for (auto it = parser_.included_files_.begin();
211 it != parser_.included_files_.end(); ++it) {
212 if (it->second.empty()) continue;
213 auto noext = flatbuffers::StripExtension(it->second);
214 auto basename = flatbuffers::StripPath(noext);
215
216 code_ += "#include \"" + parser_.opts.include_prefix +
217 (parser_.opts.keep_include_path ? noext : basename) +
218 "_generated.h\"";
219 num_includes++;
220 }
221 if (num_includes) code_ += "";
222 }
223
224 std::string EscapeKeyword(const std::string &name) const {
225 return keywords_.find(name) == keywords_.end() ? name : name + "_";

Callers

nothing calls this directly

Calls 5

StripExtensionFunction · 0.85
StripPathFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected