MCPcopy Create free account
hub / github.com/apache/thrift / generate_docstring_comment

Method generate_docstring_comment

compiler/cpp/src/thrift/generate/t_generator.cc:170–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void t_generator::generate_docstring_comment(ostream& out,
171 const string& comment_start,
172 const string& line_prefix,
173 const string& contents,
174 const string& comment_end) {
175 if (!comment_start.empty())
176 indent(out) << comment_start;
177 stringstream docs(contents, ios_base::in);
178 while (!(docs.eof() || docs.fail())) {
179 char line[1024];
180 docs.getline(line, 1024);
181
182 if (strlen(line) > 0) {
183 indent(out) << line_prefix << line << '\n';
184 } else if (line_prefix.empty()){
185 out << '\n';
186 } else if(!docs.eof()) {
187 indent(out) << line_prefix << '\n';
188 }
189 }
190 if (!comment_end.empty())
191 indent(out) << comment_end;
192}
193
194void t_generator_registry::register_generator(t_generator_factory* factory) {
195 gen_map_t& the_map = get_generator_map();

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.80
failMethod · 0.45

Tested by

no test coverage detected