Lines Matching defs:root

270 Reader::parse(const std::string& document, Value& root, bool collectComments) {
274 return parse(begin, end, root, collectComments);
277 bool Reader::parse(std::istream& sin, Value& root, bool collectComments) {
287 return parse(doc, root, collectComments);
292 Value& root,
308 nodes_.push(&root);
315 root.setComment(commentsBefore_, commentAfter);
317 if (!root.isArray() && !root.isObject()) {
1139 Value& root,
1249 Value& root,
1265 nodes_.push(&root);
1278 root.setComment(commentsBefore_, commentAfter);
1280 if (!root.isArray() && !root.isObject()) {
2065 Value* root, std::string* errs) {
2066 bool ok = reader_.parse(beginDoc, endDoc, *root, collectComments_);
2162 Value* root, std::string* errs)
2171 return reader->parse(begin, end, root, errs);
2174 std::istream& operator>>(std::istream& sin, Value& root) {
2177 bool ok = parseFromStream(b, sin, &root, &errs);
3861 const Value& Path::resolve(const Value& root) const {
3862 const Value* node = &root;
3884 Value Path::resolve(const Value& root, const Value& defaultValue) const {
3885 const Value* node = &root;
3903 Value& Path::make(Value& root) const {
3904 Value* node = &root;
4240 std::string FastWriter::write(const Value& root) {
4242 writeValue(root);
4308 std::string StyledWriter::write(const Value& root) {
4312 writeCommentBeforeValue(root);
4313 writeValue(root);
4314 writeCommentAfterValueOnSameLine(root);
4479 void StyledWriter::writeCommentBeforeValue(const Value& root) {
4480 if (!root.hasComment(commentBefore))
4485 const std::string& comment = root.getComment(commentBefore);
4499 void StyledWriter::writeCommentAfterValueOnSameLine(const Value& root) {
4500 if (root.hasComment(commentAfterOnSameLine))
4501 document_ += " " + root.getComment(commentAfterOnSameLine);
4503 if (root.hasComment(commentAfter)) {
4505 document_ += root.getComment(commentAfter);
4523 void StyledStreamWriter::write(std::ostream& out, const Value& root) {
4528 writeCommentBeforeValue(root);
4531 writeValue(root);
4532 writeCommentAfterValueOnSameLine(root);
4697 void StyledStreamWriter::writeCommentBeforeValue(const Value& root) {
4698 if (!root.hasComment(commentBefore))
4702 const std::string& comment = root.getComment(commentBefore);
4715 void StyledStreamWriter::writeCommentAfterValueOnSameLine(const Value& root) {
4716 if (root.hasComment(commentAfterOnSameLine))
4717 *document_ << ' ' << root.getComment(commentAfterOnSameLine);
4719 if (root.hasComment(commentAfter)) {
4721 *document_ << root.getComment(commentAfter);
4753 virtual int write(Value const& root, std::ostream* sout);
4763 void writeCommentBeforeValue(Value const& root);
4764 void writeCommentAfterValueOnSameLine(Value const& root);
4796 int BuiltStyledStreamWriter::write(Value const& root, std::ostream* sout)
4802 writeCommentBeforeValue(root);
4805 writeValue(root);
4806 writeCommentAfterValueOnSameLine(root);
4977 void BuiltStyledStreamWriter::writeCommentBeforeValue(Value const& root) {
4979 if (!root.hasComment(commentBefore))
4983 const std::string& comment = root.getComment(commentBefore);
4996 void BuiltStyledStreamWriter::writeCommentAfterValueOnSameLine(Value const& root) {
4998 if (root.hasComment(commentAfterOnSameLine))
4999 *sout_ << " " + root.getComment(commentAfterOnSameLine);
5001 if (root.hasComment(commentAfter)) {
5003 *sout_ << root.getComment(commentAfter);
5101 std::string writeString(StreamWriter::Factory const& builder, Value const& root) {
5104 writer->write(root, &sout);
5108 std::ostream& operator<<(std::ostream& sout, Value const& root) {
5111 writer->write(root, &sout);