summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/matcher.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2013-04-29 15:18:49 -0400
committerEliot Horowitz <eliot@10gen.com>2013-04-29 15:18:49 -0400
commitddd82aecad2179230b487285d6e081424550b7d8 (patch)
treebb1eee4c2483b1061788cb2cdfe041ddbfaff090 /src/mongo/db/matcher/matcher.h
parentb4ee2f8e1691d54391362513598d02fcf1f7aa82 (diff)
downloadmongo-ddd82aecad2179230b487285d6e081424550b7d8.tar.gz
SERVER-6400 - framework and start of Matcher replacement. using Matcher2 name
Diffstat (limited to 'src/mongo/db/matcher/matcher.h')
-rw-r--r--src/mongo/db/matcher/matcher.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/mongo/db/matcher/matcher.h b/src/mongo/db/matcher/matcher.h
new file mode 100644
index 00000000000..ced17a44c84
--- /dev/null
+++ b/src/mongo/db/matcher/matcher.h
@@ -0,0 +1,38 @@
+// matcher.h
+
+/**
+* Copyright (C) 2013 10gen Inc.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License, version 3,
+* as published by the Free Software Foundation.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "mongo/bson/bsonobj.h"
+#include "mongo/db/matcher/expression.h"
+#include "mongo/db/matcher/match_details.h"
+
+namespace mongo {
+
+ class Matcher2 : boost::noncopyable {
+ public:
+ Matcher2( const BSONObj& pattern );
+
+ bool matches(const BSONObj& doc, MatchDetails* details = NULL ) const;
+
+ private:
+ const BSONObj& _pattern; // this is owned by who created us
+ boost::scoped_ptr<Expression> _expression;
+ };
+
+}