diff options
Diffstat (limited to 'src/mongo/bson/mutable/const_element.h')
-rw-r--r-- | src/mongo/bson/mutable/const_element.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mongo/bson/mutable/const_element.h b/src/mongo/bson/mutable/const_element.h index 553e2c89079..171c25b28ce 100644 --- a/src/mongo/bson/mutable/const_element.h +++ b/src/mongo/bson/mutable/const_element.h @@ -43,11 +43,18 @@ namespace mutablebson { inline ConstElement leftChild() const; inline ConstElement rightChild() const; inline bool hasChildren() const; - inline ConstElement leftSibling() const; - inline ConstElement rightSibling() const; + inline ConstElement leftSibling(size_t distance = 1) const; + inline ConstElement rightSibling(size_t distance = 1) const; inline ConstElement parent() const; + inline ConstElement findNthChild(size_t n) const; inline ConstElement operator[](size_t n) const; + inline ConstElement findFirstChildNamed(const StringData& name) const; inline ConstElement operator[](const StringData& n) const; + inline ConstElement findElementNamed(const StringData& name) const; + + inline size_t countSiblingsLeft() const; + inline size_t countSiblingsRight() const; + inline size_t countChildren() const; inline bool hasValue() const; inline const BSONElement getValue() const; |