"use strict"; var ListOfMatchExpression = require('./ListOfMatchExpression'); // Autogenerated by cport.py on 2013-09-17 14:37 var NorMatchExpression = module.exports = function NorMatchExpression(){ base.call(this); this._matchType = 'NOR'; }, klass = NorMatchExpression, 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: 138-141 return this._debugAddSpace( level ) + "$nor\n" + this._debugList( level ); }; /** * * This documentation was automatically generated. Please update when you touch this function. * @method matches * @param * */ proto.matches = function matches( doc,detail ) { // const MatchableDocument* doc, MatchDetails* details // File: expression_tree.cpp lines: 120-126 for (var i = 0; i < this.numChildren(); i++) { if( this.getChild(i).matches( doc, null )) { return false; } } 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: 129-135 for (var i = 0; i < this.numChildren(); i++) { if( this.getChild(i).matchesSingleElement( e )) { return false; } } return true; }; /** * * This documentation was automatically generated. Please update when you touch this function. * @method shallowClone * @param * */ proto.shallowClone = function shallowClone( /* */ ){ // File: expression_tree.h lines: 105-110 // virtual MatchExpression* shallowClone() const { // NorMatchExpression* self = new NorMatchExpression(); // for (size_t i = 0; i < numChildren(); ++i) { // self->add(getChild(i)->shallowClone()); // } // return self; // } var e = new NorMatchExpression(); for (var i = 0; i < this.numChildren(); i++) { e.add(this.getChild(i).shallowClone()); } return e; };