InMatchExpression.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. "use strict"
  2. // Autogenerated by cport.py on 2013-09-17 14:37
  3. var InMatchExpression = module.exports = function (){
  4. }, klass = InMatchExpression, base = Object , proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
  5. // File: expression_leaf.h lines: 294-294
  6. // ArrayFilterEntries _arrayEntries;
  7. proto._arrayEntries = undefined;
  8. // File: expression_leaf.h lines: 294-294
  9. // ArrayFilterEntries _arrayEntries;
  10. proto._arrayEntries = undefined;
  11. /**
  12. *
  13. * This documentation was automatically generated. Please update when you touch this function.
  14. * @method InMatchExpression
  15. * @param
  16. *
  17. */
  18. proto.InMatchExpression = function InMatchExpression( /* MATCH_IN */ ){
  19. // File: expression_leaf.h lines: 275-274
  20. // InMatchExpression() : LeafMatchExpression( MATCH_IN ){}
  21. }
  22. /**
  23. *
  24. * This documentation was automatically generated. Please update when you touch this function.
  25. * @method _matchesRealElement
  26. * @param
  27. *
  28. */
  29. proto._matchesRealElement = function _matchesRealElement( /* const BSONElement& e */ ){
  30. // File: expression_leaf.cpp lines: 422-431
  31. // bool InMatchExpression::_matchesRealElement( const BSONElement& e ) const {
  32. // if ( _arrayEntries.contains( e ) )
  33. // return true;
  34. //
  35. // for ( unsigned i = 0; i < _arrayEntries.numRegexes(); i++ ) {
  36. // if ( _arrayEntries.regex(i)->matchesSingleElement( e ) )
  37. // return true;
  38. // }
  39. //
  40. // return false;
  41. // }
  42. }
  43. /**
  44. *
  45. * This documentation was automatically generated. Please update when you touch this function.
  46. * @method copyTo
  47. * @param
  48. *
  49. */
  50. proto.copyTo = function copyTo( /* InMatchExpression* toFillIn */ ){
  51. // File: expression_leaf.cpp lines: 481-483
  52. // void InMatchExpression::copyTo( InMatchExpression* toFillIn ) const {
  53. // toFillIn->init( path() );
  54. // _arrayEntries.copyTo( toFillIn->_arrayEntries );
  55. // }
  56. }
  57. /**
  58. *
  59. * This documentation was automatically generated. Please update when you touch this function.
  60. * @method debugString
  61. * @param
  62. *
  63. */
  64. proto.debugString = function debugString( /* StringBuilder& debug, int level */ ){
  65. // File: expression_leaf.cpp lines: 455-463
  66. // void InMatchExpression::debugString( StringBuilder& debug, int level ) const {
  67. // _debugAddSpace( debug, level );
  68. // debug << path() << ";$in: TODO ";
  69. // MatchExpression::TagData* td = getTag();
  70. // if (NULL != td) {
  71. // debug << " ";
  72. // td->debugString(&debug);
  73. // }
  74. // debug << "\n";
  75. // }
  76. }
  77. /**
  78. *
  79. * This documentation was automatically generated. Please update when you touch this function.
  80. * @method equivalent
  81. * @param
  82. *
  83. */
  84. proto.equivalent = function equivalent( /* const MatchExpression* other */ ){
  85. // File: expression_leaf.cpp lines: 466-472
  86. // bool InMatchExpression::equivalent( const MatchExpression* other ) const {
  87. // if ( matchType() != other->matchType() )
  88. // return false;
  89. // const InMatchExpression* realOther = static_cast<const InMatchExpression*>( other );
  90. // return
  91. // path() == realOther->path() &&
  92. // _arrayEntries.equivalent( realOther->_arrayEntries );
  93. // }
  94. }
  95. /**
  96. *
  97. * This documentation was automatically generated. Please update when you touch this function.
  98. * @method getArrayFilterEntries
  99. * @param
  100. *
  101. */
  102. proto.getArrayFilterEntries = function getArrayFilterEntries( /* */ ){
  103. // File: expression_leaf.h lines: 280-279
  104. // ArrayFilterEntries* getArrayFilterEntries() { return &_arrayEntries; }
  105. }
  106. /**
  107. *
  108. * This documentation was automatically generated. Please update when you touch this function.
  109. * @method getData
  110. * @param
  111. *
  112. */
  113. proto.getData = function getData( /* */ ){
  114. // File: expression_leaf.h lines: 290-289
  115. // const ArrayFilterEntries& getData() const { return _arrayEntries; }
  116. }
  117. /**
  118. *
  119. * This documentation was automatically generated. Please update when you touch this function.
  120. * @method init
  121. * @param
  122. *
  123. */
  124. proto.init = function init( /* const StringData& path */ ){
  125. // File: expression_leaf.cpp lines: 418-419
  126. // Status InMatchExpression::init( const StringData& path ) {
  127. // return initPath( path );
  128. // }
  129. }
  130. /**
  131. *
  132. * This documentation was automatically generated. Please update when you touch this function.
  133. * @method matchesSingleElement
  134. * @param
  135. *
  136. */
  137. proto.matchesSingleElement = function matchesSingleElement( /* const BSONElement& e */ ){
  138. // File: expression_leaf.cpp lines: 434-452
  139. // bool InMatchExpression::matchesSingleElement( const BSONElement& e ) const {
  140. // if ( _arrayEntries.hasNull() && e.eoo() )
  141. // return true;
  142. //
  143. // if ( _matchesRealElement( e ) )
  144. // return true;
  145. //
  146. // /*
  147. // if ( e.type() == Array ) {
  148. // BSONObjIterator i( e.Obj() );
  149. // while ( i.more() ) {
  150. // BSONElement sub = i.next();
  151. // if ( _matchesRealElement( sub ) )
  152. // return true;
  153. // }
  154. // }
  155. // */
  156. //
  157. // return false;
  158. // }
  159. }
  160. /**
  161. *
  162. * This documentation was automatically generated. Please update when you touch this function.
  163. * @method shallowClone
  164. * @param
  165. *
  166. */
  167. proto.shallowClone = function shallowClone( /* */ ){
  168. // File: expression_leaf.cpp lines: 475-478
  169. // LeafMatchExpression* InMatchExpression::shallowClone() const {
  170. // InMatchExpression* next = new InMatchExpression();
  171. // copyTo( next );
  172. // return next;
  173. // }
  174. }