NotMatchExpression.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. "use strict";
  2. var MatchExpression = require('./MatchExpression');
  3. // Autogenerated by cport.py on 2013-09-17 14:37
  4. var NotMatchExpression = module.exports = function NotMatchExpression(){
  5. base.call(this);
  6. this._matchType = 'NOT';
  7. }, klass = NotMatchExpression, base = Object , proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
  8. // File: expression_tree.h lines: 152-152
  9. // boost::scoped_ptr<MatchExpression> _exp;
  10. proto._exp = undefined;
  11. /**
  12. *
  13. * This documentation was automatically generated. Please update when you touch this function.
  14. * @method debugString
  15. * @param
  16. *
  17. */
  18. proto.debugString = function debugString( level ) { // StringBuilder& debug, int level
  19. // File: expression_tree.cpp lines: 146-149
  20. return this._debugAddSpace( level ) + "$not\n" + this._exp._debugString( level + 1 );
  21. };
  22. /**
  23. *
  24. * This documentation was automatically generated. Please update when you touch this function.
  25. * @method equivalent
  26. * @param
  27. *
  28. */
  29. proto.equivalent = function equivalent( other ) { // const MatchExpression* other
  30. // File: expression_tree.cpp lines: 152-156
  31. return other._matchType == 'NOT' && this._exp.equivalent(other.getChild(0));
  32. };
  33. /**
  34. *
  35. * This documentation was automatically generated. Please update when you touch this function.
  36. * @method getChild
  37. * @param
  38. *
  39. */
  40. proto.getChild = function getChild( i ) { // size_t i
  41. // File: expression_tree.h lines: 148-147
  42. // virtual MatchExpression* getChild( size_t i ) const { return _exp.get(); }
  43. return this._exp;
  44. };
  45. /**
  46. *
  47. * This documentation was automatically generated. Please update when you touch this function.
  48. * @method init
  49. * @param
  50. *
  51. */
  52. proto.init = function init( exp ) { // MatchExpression* exp
  53. // File: expression_tree.h lines: 123-125
  54. this._exp = exp;
  55. return {'code':'OK'};
  56. };
  57. /**
  58. *
  59. * This documentation was automatically generated. Please update when you touch this function.
  60. * @method matches
  61. * @param
  62. *
  63. */
  64. proto.matches = function matches( doc,details ) { // const MatchableDocument* doc, MatchDetails* details = 0
  65. // File: expression_tree.h lines: 135-136
  66. return ! this._exp.matches( doc,null );
  67. };
  68. /**
  69. *
  70. * This documentation was automatically generated. Please update when you touch this function.
  71. * @method matchesSingleElement
  72. * @param
  73. *
  74. */
  75. proto.matchesSingleElement = function matchesSingleElement( e ) { // const BSONElement& e
  76. // File: expression_tree.h lines: 139-140
  77. return ! this._exp.matchesSingleElement( e );
  78. };
  79. /**
  80. *
  81. * This documentation was automatically generated. Please update when you touch this function.
  82. * @method numChildren
  83. * @param
  84. *
  85. */
  86. proto.numChildren = function numChildren( /* */ ){
  87. // File: expression_tree.h lines: 147-146
  88. return 1;
  89. };
  90. /**
  91. *
  92. * This documentation was automatically generated. Please update when you touch this function.
  93. * @method shallowClone
  94. * @param
  95. *
  96. */
  97. proto.shallowClone = function shallowClone( /* */ ){
  98. // File: expression_tree.h lines: 128-132
  99. var e = new NotMatchExpression();
  100. e.init(this._exp.shallowClone());
  101. return e;
  102. };