"use strict"; ListOfMatchExpression = require('ListOfMatchExpression'); // Autogenerated by cport.py on 2013-09-17 14:37 var OrMatchExpression = module.exports = function OrMatchExpression (){ this._matchType = 'OR'; }, klass = OrMatchExpression, base = ListOfMatchExpression, proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}}); /** * * This documentation was automatically generated. Please update when you touch this function. * @method debugString * @param * */ proto.debugString = function debugString( level ) { // StringBuilder& debug, int level // File: expression_tree.cpp lines: 112-115 return this._debugAddSpace( level ) + "$or\n" + this._debugList( level ); }; /** * * This documentation was automatically generated. Please update when you touch this function. * @method matches * @param * */ proto.matches = function matches( doc,details ) { // const MatchableDocument* doc, MatchDetails* details // File: expression_tree.cpp lines: 93-99 for (var i = 0; i < this.numChildren(); i++) { if (this.getChild(i).matches( doc, null ) ){ return true; } } }; /** * * This documentation was automatically generated. Please update when you touch this function. * @method matchesSingleElement * @param * */ proto.matchesSingleElement = function matchesSingleElement( e ) { // const BSONElement& e // File: expression_tree.cpp lines: 102-108 for (var i = 0; i < this.numChildren(); i++) { if( this.getChild(i).matchesSingleElement(e) ) { return true; } } return false; }; /** * * This documentation was automatically generated. Please update when you touch this function. * @method shallowClone * @param * */ proto.shallowClone = function shallowClone( /* */ ){ // File: expression_tree.h lines: 86-91 clone = new OrMatchExpression(); for (var i = 0; i < this.numChildren(); i++) { clone.add(this.getChild(i).shallowClone()); } return clone; }