summaryrefslogtreecommitdiff
path: root/src/mongo/bson/bsonobjbuilder.h
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2018-03-05 15:48:48 -0500
committerBilly Donahue <billy.donahue@mongodb.com>2018-03-06 10:04:53 -0500
commite3a3f54a6c0ec4f471e0aff7a48b8a30f8c0e9cb (patch)
tree9c2f4ac5a4d8751336397c8af59a08bf78f1c201 /src/mongo/bson/bsonobjbuilder.h
parent5dfa372b25b1a26bb12e09fdb029ff219b0f5343 (diff)
downloadmongo-e3a3f54a6c0ec4f471e0aff7a48b8a30f8c0e9cb.tar.gz
SERVER-33065 CommandReplyBuilder and CommandInvocation
Revert "Revert "SERVER-33065 CommandReplyBuilder and CommandInvocation"" This reverts commit 74177edb35b6ce7594e4751051010ceade592484. Leave out the unintentional repl/ change this time.
Diffstat (limited to 'src/mongo/bson/bsonobjbuilder.h')
-rw-r--r--src/mongo/bson/bsonobjbuilder.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/bson/bsonobjbuilder.h b/src/mongo/bson/bsonobjbuilder.h
index 38dae8234fa..c8aed97e15b 100644
--- a/src/mongo/bson/bsonobjbuilder.h
+++ b/src/mongo/bson/bsonobjbuilder.h
@@ -172,6 +172,14 @@ public:
}
}
+ /**
+ * The start offset of the object being built by this builder within its buffer.
+ * Needed for the object-resuming constructor.
+ */
+ std::size_t offset() const {
+ return _offset;
+ }
+
/** add all the fields from the object specified to this object */
BSONObjBuilder& appendElements(const BSONObj& x);