MCPcopy Create free account
hub / github.com/apache/trafficserver / WriteComment

Function WriteComment

lib/yamlcpp/src/emitterutils.cpp:409–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409bool WriteComment(ostream_wrapper& out, const std::string& str,
410 std::size_t postCommentIndent) {
411 const std::size_t curIndent = out.col();
412 out << "#" << Indentation(postCommentIndent);
413 out.set_comment();
414 int codePoint;
415 for (std::string::const_iterator i = str.begin();
416 GetNextCodePointAndAdvance(codePoint, i, str.end());) {
417 if (codePoint == '\n') {
418 out << "\n"
419 << IndentTo(curIndent) << "#" << Indentation(postCommentIndent);
420 out.set_comment();
421 } else {
422 WriteCodePoint(out, codePoint);
423 }
424 }
425 return true;
426}
427
428bool WriteAlias(ostream_wrapper& out, const std::string& str) {
429 out << "*";

Callers 1

emitter.cppFile · 0.85

Calls 6

IndentationClass · 0.85
IndentToClass · 0.85
WriteCodePointFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected