diff options
Diffstat (limited to 'src/mongo/db/matcher/expression.h')
-rw-r--r-- | src/mongo/db/matcher/expression.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/mongo/db/matcher/expression.h b/src/mongo/db/matcher/expression.h index c87738faaf8..812781a3ad9 100644 --- a/src/mongo/db/matcher/expression.h +++ b/src/mongo/db/matcher/expression.h @@ -354,12 +354,19 @@ public: */ virtual MatchExpression* getChild(size_t index) const = 0; + + /** + * Delegates to the specified child unique_ptr's reset() method in order to replace child + * expressions while traversing the tree. + */ + virtual void resetChild(size_t index, MatchExpression* other) = 0; + /** - * For MatchExpression nodes that can participate in tree restructuring (like AND/OR), returns a - * non-const vector of MatchExpression* child nodes. If the MatchExpression does not - * participated in tree restructuring, returns boost::none. - * Do not use to traverse the MatchExpression tree. Use numChildren() and getChild(), which - * provide access to all nodes. + * For MatchExpression nodes that can participate in tree restructuring (like AND/OR), + * returns a non-const vector of MatchExpression* child nodes. If the MatchExpression does + * not participated in tree restructuring, returns boost::none. Do not use to traverse the + * MatchExpression tree. Use numChildren() and getChild(), which provide access to all + * nodes. */ virtual std::vector<std::unique_ptr<MatchExpression>>* getChildVector() = 0; |