diff options
Diffstat (limited to 'src/mongo/db/matcher/matcher.h')
-rw-r--r-- | src/mongo/db/matcher/matcher.h | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/src/mongo/db/matcher/matcher.h b/src/mongo/db/matcher/matcher.h index 629f08facd5..e7ea9d93f1a 100644 --- a/src/mongo/db/matcher/matcher.h +++ b/src/mongo/db/matcher/matcher.h @@ -41,27 +41,31 @@ namespace mongo { - /** - * Matcher is a simple wrapper around a BSONObj and the MatchExpression created from it. - */ - class Matcher { - MONGO_DISALLOW_COPYING(Matcher); +/** + * Matcher is a simple wrapper around a BSONObj and the MatchExpression created from it. + */ +class Matcher { + MONGO_DISALLOW_COPYING(Matcher); - public: - explicit Matcher(const BSONObj& pattern, - const MatchExpressionParser::WhereCallback& whereCallback = - MatchExpressionParser::WhereCallback()); +public: + explicit Matcher(const BSONObj& pattern, + const MatchExpressionParser::WhereCallback& whereCallback = + MatchExpressionParser::WhereCallback()); - bool matches(const BSONObj& doc, MatchDetails* details = NULL ) const; + bool matches(const BSONObj& doc, MatchDetails* details = NULL) const; - const BSONObj* getQuery() const { return &_pattern; }; + const BSONObj* getQuery() const { + return &_pattern; + }; - std::string toString() const { return _pattern.toString(); } + std::string toString() const { + return _pattern.toString(); + } - private: - BSONObj _pattern; +private: + BSONObj _pattern; - std::unique_ptr<MatchExpression> _expression; - }; + std::unique_ptr<MatchExpression> _expression; +}; } // namespace mongo |