MCPcopy Create free account
hub / github.com/Samsung/UTopia / writeCommentBeforeValue

Method writeCommentBeforeValue

external/jsoncpp/jsoncpp.cpp:4671–4688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4669}
4670
4671void StyledWriter::writeCommentBeforeValue(const Value &root) {
4672 if (!root.hasComment(commentBefore))
4673 return;
4674
4675 document_ += '\n';
4676 writeIndent();
4677 const String &comment = root.getComment(commentBefore);
4678 String::const_iterator iter = comment.begin();
4679 while (iter != comment.end()) {
4680 document_ += *iter;
4681 if (*iter == '\n' && ((iter + 1) != comment.end() && *(iter + 1) == '/'))
4682 writeIndent();
4683 ++iter;
4684 }
4685
4686 // Comments are stripped of trailing newlines, so add one here
4687 document_ += '\n';
4688}
4689
4690void StyledWriter::writeCommentAfterValueOnSameLine(const Value &root) {
4691 if (root.hasComment(commentAfterOnSameLine))

Callers

nothing calls this directly

Calls 4

hasCommentMethod · 0.80
getCommentMethod · 0.80
beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected