MCPcopy Create free account
hub / github.com/PlayFab/gsdk / writeCommentBeforeValue

Method writeCommentBeforeValue

cpp/cppsdk/jsoncpp.cpp:4779–4796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4777}
4778
4779void StyledWriter::writeCommentBeforeValue(const Value& root) {
4780 if (!root.hasComment(commentBefore))
4781 return;
4782
4783 document_ += '\n';
4784 writeIndent();
4785 const JSONCPP_STRING& comment = root.getComment(commentBefore);
4786 JSONCPP_STRING::const_iterator iter = comment.begin();
4787 while (iter != comment.end()) {
4788 document_ += *iter;
4789 if (*iter == '\n' && ((iter + 1) != comment.end() && *(iter + 1) == '/'))
4790 writeIndent();
4791 ++iter;
4792 }
4793
4794 // Comments are stripped of trailing newlines, so add one here
4795 document_ += '\n';
4796}
4797
4798void StyledWriter::writeCommentAfterValueOnSameLine(const Value& root) {
4799 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