mongo::Matcher Class Reference

#include <matcher.h>

List of all members.

Public Member Functions

void addOrConstraint (const shared_ptr< FieldRangeVector > &frv)
bool atomic () const
bool hasType (BSONObj::MatchType type) const
bool keyMatch () const
 Matcher (const BSONObj &pattern, bool subMatcher=false)
bool matches (const BSONObj &j, MatchDetails *details=0)
void popOrClause ()
bool sameCriteriaCount (const Matcher &other) const
string toString () const
 ~Matcher ()

Static Public Member Functions

static int opDirection (int op)

Private Member Functions

void addBasic (const BSONElement &e, int c, bool isNot)
bool addOp (const BSONElement &e, const BSONElement &fe, bool isNot, const char *&regex, const char *&flags)
void addRegex (const char *fieldName, const char *regex, const char *flags, bool isNot=false)
 Matcher (const Matcher &other, const BSONObj &constrainIndexKey)
int matchesDotted (const char *fieldName, const BSONElement &toMatch, const BSONObj &obj, int compareOp, const ElementMatcher &bm, bool isArr, MatchDetails *details)
int matchesNe (const char *fieldName, const BSONElement &toMatch, const BSONObj &obj, const ElementMatcher &bm, MatchDetails *details)
void parseOr (const BSONElement &e, bool subMatcher, list< shared_ptr< Matcher > > &matchers)
bool parseOrNor (const BSONElement &e, bool subMatcher)
int valuesMatch (const BSONElement &l, const BSONElement &r, int op, const ElementMatcher &bm)

Private Attributes

bool _atomic
vector< shared_ptr
< BSONObjBuilder > > 
_builders
list< shared_ptr< Matcher > > _norMatchers
vector< shared_ptr
< FieldRangeVector > > 
_orConstraints
list< shared_ptr< Matcher > > _orMatchers
bool all
vector< ElementMatcherbasics
BSONObj constrainIndexKey_
bool hasArray
bool haveNeg
bool haveSize
BSONObj jsobj
int nRegex
RegexMatcher regexs [4]
Where * where

Friends

class CoveredIndexMatcher

Detailed Description

Definition at line 121 of file matcher.h.


Constructor & Destructor Documentation

mongo::Matcher::Matcher ( const BSONObj pattern,
bool  subMatcher = false 
)
mongo::Matcher::~Matcher (  ) 
mongo::Matcher::Matcher ( const Matcher other,
const BSONObj constrainIndexKey 
) [private]

Member Function Documentation

void mongo::Matcher::addBasic ( const BSONElement e,
int  c,
bool  isNot 
) [inline, private]

Definition at line 171 of file matcher.h.

bool mongo::Matcher::addOp ( const BSONElement e,
const BSONElement fe,
bool  isNot,
const char *&  regex,
const char *&  flags 
) [private]
void mongo::Matcher::addOrConstraint ( const shared_ptr< FieldRangeVector > &  frv  )  [inline]

Definition at line 156 of file matcher.h.

void mongo::Matcher::addRegex ( const char *  fieldName,
const char *  regex,
const char *  flags,
bool  isNot = false 
) [private]
bool mongo::Matcher::atomic (  )  const [inline]

Definition at line 148 of file matcher.h.

bool mongo::Matcher::hasType ( BSONObj::MatchType  type  )  const
bool mongo::Matcher::keyMatch (  )  const [inline]

Definition at line 146 of file matcher.h.

bool mongo::Matcher::matches ( const BSONObj j,
MatchDetails details = 0 
)
int mongo::Matcher::matchesDotted ( const char *  fieldName,
const BSONElement toMatch,
const BSONObj obj,
int  compareOp,
const ElementMatcher bm,
bool  isArr,
MatchDetails details 
) [private]
int mongo::Matcher::matchesNe ( const char *  fieldName,
const BSONElement toMatch,
const BSONObj obj,
const ElementMatcher bm,
MatchDetails details 
) [private]
static int mongo::Matcher::opDirection ( int  op  )  [inline, static]

Definition at line 133 of file matcher.h.

void mongo::Matcher::parseOr ( const BSONElement e,
bool  subMatcher,
list< shared_ptr< Matcher > > &  matchers 
) [private]
bool mongo::Matcher::parseOrNor ( const BSONElement e,
bool  subMatcher 
) [private]
void mongo::Matcher::popOrClause (  )  [inline]

Definition at line 160 of file matcher.h.

bool mongo::Matcher::sameCriteriaCount ( const Matcher other  )  const
string mongo::Matcher::toString (  )  const [inline]

Definition at line 152 of file matcher.h.

int mongo::Matcher::valuesMatch ( const BSONElement l,
const BSONElement r,
int  op,
const ElementMatcher bm 
) [private]

Friends And Related Function Documentation

friend class CoveredIndexMatcher [friend]

Definition at line 211 of file matcher.h.


Member Data Documentation

bool mongo::Matcher::_atomic [private]

Definition at line 200 of file matcher.h.

vector< shared_ptr< BSONObjBuilder > > mongo::Matcher::_builders [private]

Definition at line 206 of file matcher.h.

list< shared_ptr< Matcher > > mongo::Matcher::_norMatchers [private]

Definition at line 208 of file matcher.h.

vector< shared_ptr< FieldRangeVector > > mongo::Matcher::_orConstraints [private]

Definition at line 209 of file matcher.h.

list< shared_ptr< Matcher > > mongo::Matcher::_orMatchers [private]

Definition at line 207 of file matcher.h.

bool mongo::Matcher::all [private]

Definition at line 191 of file matcher.h.

Definition at line 189 of file matcher.h.

Definition at line 188 of file matcher.h.

bool mongo::Matcher::hasArray [private]

Definition at line 192 of file matcher.h.

bool mongo::Matcher::haveNeg [private]

Definition at line 193 of file matcher.h.

bool mongo::Matcher::haveSize [private]

Definition at line 190 of file matcher.h.

Definition at line 187 of file matcher.h.

int mongo::Matcher::nRegex [private]

Definition at line 203 of file matcher.h.

Definition at line 202 of file matcher.h.

Where* mongo::Matcher::where [private]

Definition at line 186 of file matcher.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:56 2013