|
|
@@ -1,32 +1,12 @@
|
|
|
-"use strict"
|
|
|
+"use strict";
|
|
|
|
|
|
+var ListOfMatchExpression = require('./ListOfMatchExpression');
|
|
|
|
|
|
|
|
|
// Autogenerated by cport.py on 2013-09-17 14:37
|
|
|
-var NorMatchExpression = module.exports = function (){
|
|
|
-
|
|
|
-}, klass = NorMatchExpression, base = Object , proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-/**
|
|
|
- *
|
|
|
- * This documentation was automatically generated. Please update when you touch this function.
|
|
|
- * @method NorMatchExpression
|
|
|
- * @param
|
|
|
- *
|
|
|
- */
|
|
|
-proto.NorMatchExpression = function NorMatchExpression( /* NOR */ ){
|
|
|
-// File: expression_tree.h lines: 99-98
|
|
|
-// NorMatchExpression() : ListOfMatchExpression( NOR ){}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
+var NorMatchExpression = module.exports = function NorMatchExpression(){
|
|
|
|
|
|
+}, klass = NorMatchExpression, base = ListOfMatchExpression, proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
@@ -35,18 +15,10 @@ proto.NorMatchExpression = function NorMatchExpression( /* NOR */ ){
|
|
|
* @param
|
|
|
*
|
|
|
*/
|
|
|
-proto.debugString = function debugString( /* StringBuilder& debug, int level */ ){
|
|
|
-
|
|
|
+proto.debugString = function debugString( level ) { // StringBuilder& debug, int level
|
|
|
// File: expression_tree.cpp lines: 138-141
|
|
|
-// void NorMatchExpression::debugString( StringBuilder& debug, int level ) const {
|
|
|
-// _debugAddSpace( debug, level );
|
|
|
-// debug << "$nor\n";
|
|
|
-// _debugList( debug, level );
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
+ return this._debugAddSpace( level ) + "$nor\n" + this._debugList( level );
|
|
|
+};
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -56,21 +28,15 @@ proto.debugString = function debugString( /* StringBuilder& debug, int level *
|
|
|
* @param
|
|
|
*
|
|
|
*/
|
|
|
-proto.matches = function matches( /* const MatchableDocument* doc, MatchDetails* details */ ){
|
|
|
-
|
|
|
+proto.matches = function matches( doc,detail ) { // const MatchableDocument* doc, MatchDetails* details
|
|
|
// File: expression_tree.cpp lines: 120-126
|
|
|
-// bool NorMatchExpression::matches( const MatchableDocument* doc, MatchDetails* details ) const {
|
|
|
-// for ( size_t i = 0; i < numChildren(); i++ ) {
|
|
|
-// if ( getChild(i)->matches( doc, NULL ) ) {
|
|
|
-// return false;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return true;
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
+ for (var i = 0; i < this.numChildren(); i++) {
|
|
|
+ if( this.getChild(i).matches( doc, null )) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+};
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -80,21 +46,15 @@ proto.matches = function matches( /* const MatchableDocument* doc, MatchDetails
|
|
|
* @param
|
|
|
*
|
|
|
*/
|
|
|
-proto.matchesSingleElement = function matchesSingleElement( /* const BSONElement& e */ ){
|
|
|
-
|
|
|
+proto.matchesSingleElement = function matchesSingleElement( e ) { // const BSONElement& e
|
|
|
// File: expression_tree.cpp lines: 129-135
|
|
|
-// bool NorMatchExpression::matchesSingleElement( const BSONElement& e ) const {
|
|
|
-// for ( size_t i = 0; i < numChildren(); i++ ) {
|
|
|
-// if ( getChild(i)->matchesSingleElement( e ) ) {
|
|
|
-// return false;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return true;
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
+ for (var i = 0; i < this.numChildren(); i++) {
|
|
|
+ if( this.getChild(i).matchesSingleElement( e )) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+};
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -113,25 +73,10 @@ proto.shallowClone = function shallowClone( /* */ ){
|
|
|
// }
|
|
|
// return self;
|
|
|
// }
|
|
|
+ var e = new NorMatchExpression();
|
|
|
+ for (var i = 0; i < this.numChildren(); i++) {
|
|
|
+ e.add(this.getChild(i).shallowClone());
|
|
|
+ }
|
|
|
+ return e;
|
|
|
+};
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-/**
|
|
|
- *
|
|
|
- * This documentation was automatically generated. Please update when you touch this function.
|
|
|
- * @method ~NorMatchExpression
|
|
|
- * @param
|
|
|
- *
|
|
|
- */
|
|
|
-proto.~NorMatchExpression = function ~NorMatchExpression( /* */ ){
|
|
|
-// File: expression_tree.h lines: 100-99
|
|
|
-// virtual ~NorMatchExpression(){}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|