@@ -963,25 +963,16 @@ class StreamWriterBuilder {
963
963
typedef StreamWriter::CommentStyle CommentStyle;
964
964
CommentStyle cs_;
965
965
std::string indentation_;
966
- bool dropNullPlaceholders_;
967
- bool omitEndingLineFeed_;
968
- bool enableYAMLCompatibility_;
969
966
public:
970
967
StreamWriterBuilder ();
971
968
virtual ~StreamWriterBuilder ();
972
969
virtual void setCommentStyle (CommentStyle cs);
973
970
virtual void setIndentation (std::string indentation);
974
- virtual void setDropNullPlaceholders (bool v);
975
- virtual void setOmitEndingLineFeed (bool v);
976
- virtual void setEnableYAMLCompatibility (bool v);
977
971
virtual StreamWriter* newStreamWriter (std::ostream* sout) const ;
978
972
};
979
973
StreamWriterBuilder::StreamWriterBuilder ()
980
974
: cs_(CommentStyle::All)
981
975
, indentation_(" \t " )
982
- , dropNullPlaceholders_(false )
983
- , omitEndingLineFeed_(false )
984
- , enableYAMLCompatibility_(false )
985
976
{
986
977
}
987
978
StreamWriterBuilder::~StreamWriterBuilder ()
@@ -996,36 +987,14 @@ void StreamWriterBuilder::setIndentation(std::string v)
996
987
indentation_ = v;
997
988
if (indentation_.empty ()) cs_ = CommentStyle::None;
998
989
}
999
- void StreamWriterBuilder::setDropNullPlaceholders (bool v)
1000
- {
1001
- dropNullPlaceholders_ = v;
1002
- }
1003
- void StreamWriterBuilder::setOmitEndingLineFeed (bool v)
1004
- {
1005
- omitEndingLineFeed_ = v;
1006
- }
1007
- void StreamWriterBuilder::setEnableYAMLCompatibility (bool v)
1008
- {
1009
- enableYAMLCompatibility_ = v;
1010
- }
1011
990
StreamWriter* StreamWriterBuilder::newStreamWriter (std::ostream* stream) const
1012
991
{
1013
992
std::string colonSymbol = " : " ;
1014
993
if (indentation_.empty ()) {
1015
- if (enableYAMLCompatibility_) {
1016
- colonSymbol = " : " ;
1017
- } else {
1018
- colonSymbol = " :" ;
1019
- }
994
+ colonSymbol = " :" ;
1020
995
}
1021
996
std::string nullSymbol = " null" ;
1022
- if (dropNullPlaceholders_) {
1023
- nullSymbol = " " ;
1024
- }
1025
- std::string endingLineFeedSymbol = " \n " ;
1026
- if (omitEndingLineFeed_) {
1027
- endingLineFeedSymbol = " " ;
1028
- }
997
+ std::string endingLineFeedSymbol = " " ;
1029
998
return new BuiltStyledStreamWriter (stream,
1030
999
indentation_, cs_,
1031
1000
colonSymbol, nullSymbol, endingLineFeedSymbol);
@@ -1068,21 +1037,6 @@ StreamWriter::Builder& StreamWriter::Builder::withIndentation(std::string v)
1068
1037
own_->setIndentation (v);
1069
1038
return *this ;
1070
1039
}
1071
- StreamWriter::Builder& StreamWriter::Builder::withDropNullPlaceholders (bool v)
1072
- {
1073
- own_->setDropNullPlaceholders (v);
1074
- return *this ;
1075
- }
1076
- StreamWriter::Builder& StreamWriter::Builder::withOmitEndingLineFeed (bool v)
1077
- {
1078
- own_->setOmitEndingLineFeed (v);
1079
- return *this ;
1080
- }
1081
- StreamWriter::Builder& StreamWriter::Builder::withEnableYAMLCompatibility (bool v)
1082
- {
1083
- own_->setEnableYAMLCompatibility (v);
1084
- return *this ;
1085
- }
1086
1040
StreamWriter* StreamWriter::Builder::newStreamWriter (
1087
1041
std::ostream* sout) const
1088
1042
{
0 commit comments