NotMatchExpression.js 3.0 KB

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