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

Class BuiltStyledStreamWriter

cpp/cppsdk/jsoncpp.cpp:5047–5086  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5045};
5046
5047struct BuiltStyledStreamWriter : public StreamWriter {
5048 BuiltStyledStreamWriter(JSONCPP_STRING const& indentation,
5049 CommentStyle::Enum cs,
5050 JSONCPP_STRING const& colonSymbol,
5051 JSONCPP_STRING const& nullSymbol,
5052 JSONCPP_STRING const& endingLineFeedSymbol,
5053 bool useSpecialFloats,
5054 unsigned int precision,
5055 PrecisionType precisionType);
5056 int write(Value const& root, JSONCPP_OSTREAM* sout) JSONCPP_OVERRIDE;
5057
5058private:
5059 void writeValue(Value const& value);
5060 void writeArrayValue(Value const& value);
5061 bool isMultilineArray(Value const& value);
5062 void pushValue(JSONCPP_STRING const& value);
5063 void writeIndent();
5064 void writeWithIndent(JSONCPP_STRING const& value);
5065 void indent();
5066 void unindent();
5067 void writeCommentBeforeValue(Value const& root);
5068 void writeCommentAfterValueOnSameLine(Value const& root);
5069 static bool hasCommentForValue(const Value& value);
5070
5071 typedef std::vector<JSONCPP_STRING> ChildValues;
5072
5073 ChildValues childValues_;
5074 JSONCPP_STRING indentString_;
5075 unsigned int rightMargin_;
5076 JSONCPP_STRING indentation_;
5077 CommentStyle::Enum cs_;
5078 JSONCPP_STRING colonSymbol_;
5079 JSONCPP_STRING nullSymbol_;
5080 JSONCPP_STRING endingLineFeedSymbol_;
5081 bool addChildValues_ : 1;
5082 bool indented_ : 1;
5083 bool useSpecialFloats_ : 1;
5084 unsigned int precision_;
5085 PrecisionType precisionType_;
5086};
5087BuiltStyledStreamWriter::BuiltStyledStreamWriter(
5088 JSONCPP_STRING const& indentation,
5089 CommentStyle::Enum cs,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected