diff options
-rw-r--r-- | src/mongo/db/pipeline/expression_test.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/pipeline/expression_visitor.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/expression_test.cpp b/src/mongo/db/pipeline/expression_test.cpp index 62695188828..5028d870e24 100644 --- a/src/mongo/db/pipeline/expression_test.cpp +++ b/src/mongo/db/pipeline/expression_test.cpp @@ -222,6 +222,10 @@ public: return _isCommutative; } + void acceptVisitor(ExpressionVisitor* visitor) final { + return visitor->visit(this); + } + static intrusive_ptr<Testable> create(bool associative, bool commutative) { return new Testable(associative, commutative); } diff --git a/src/mongo/db/pipeline/expression_visitor.h b/src/mongo/db/pipeline/expression_visitor.h index e049c127c3c..7141547ad54 100644 --- a/src/mongo/db/pipeline/expression_visitor.h +++ b/src/mongo/db/pipeline/expression_visitor.h @@ -31,6 +31,10 @@ #include "mongo/platform/basic.h" +namespace ExpressionTests { +class Testable; +} // namespace ExpressionTests + namespace mongo { class ExpressionConstant; @@ -268,6 +272,7 @@ public: virtual void visit(ExpressionFromAccumulator<AccumulatorStdDevSamp>*) = 0; virtual void visit(ExpressionFromAccumulator<AccumulatorSum>*) = 0; virtual void visit(ExpressionFromAccumulator<AccumulatorMergeObjects>*) = 0; + virtual void visit(ExpressionTests::Testable*) = 0; }; } // namespace mongo |