| 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 + "_"; |
nothing calls this directly
no test coverage detected