MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / GenComment

Function GenComment

native/thirdpart/flatbuffers/code_generators.cpp:176–198  ·  view source on GitHub ↗

Generate a documentation comment, if available.

Source from the content-addressed store, hash-verified

174
175// Generate a documentation comment, if available.
176void GenComment(const std::vector<std::string> &dc, std::string *code_ptr,
177 const CommentConfig *config, const char *prefix) {
178 if (dc.begin() == dc.end()) {
179 // Don't output empty comment blocks with 0 lines of comment content.
180 return;
181 }
182
183 std::string &code = *code_ptr;
184 if (config != nullptr && config->first_line != nullptr) {
185 code += std::string(prefix) + std::string(config->first_line) + "\n";
186 }
187 std::string line_prefix =
188 std::string(prefix) +
189 ((config != nullptr && config->content_line_prefix != nullptr)
190 ? config->content_line_prefix
191 : "///");
192 for (auto it = dc.begin(); it != dc.end(); ++it) {
193 code += line_prefix + *it + "\n";
194 }
195 if (config != nullptr && config->last_line != nullptr) {
196 code += std::string(prefix) + std::string(config->last_line) + "\n";
197 }
198}
199
200template<typename T>
201std::string FloatConstantGenerator::GenFloatConstantImpl(

Callers 1

GenerateFBSFunction · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected