summaryrefslogtreecommitdiff
path: root/src/mongo/bson/mutable/element.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/bson/mutable/element.h')
-rw-r--r--src/mongo/bson/mutable/element.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mongo/bson/mutable/element.h b/src/mongo/bson/mutable/element.h
index 7949344f824..9ae13dda2af 100644
--- a/src/mongo/bson/mutable/element.h
+++ b/src/mongo/bson/mutable/element.h
@@ -385,11 +385,21 @@ public:
// Serialization API.
//
- /** Write this Element to the provided object builder. */
+ /**
+ * Writes this Element to the provided object builder. Note that if this element is not a root,
+ * then it gets wrapped inside an object.
+ */
void writeTo(BSONObjBuilder* builder) const;
- /** Write this Element to the provided array builder. This Element must be of type
- * mongo::Array.
+ /**
+ * Writes all the children of the current Element to the provided object builder. This Element
+ * must be of type mongo::Object.
+ */
+ void writeChildrenTo(BSONObjBuilder* builder) const;
+
+ /**
+ * Write this Element to the provided array builder. This Element must be of type
+ * mongo::Array.
*/
void writeArrayTo(BSONArrayBuilder* builder) const;