ElemMatchValueMatchExpression.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. "use strict"
  2. // Autogenerated by cport.py on 2013-09-17 14:37
  3. var ElemMatchValueMatchExpression = module.exports = function (){
  4. }, klass = ElemMatchValueMatchExpression, base = Object , proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
  5. // File: expression_array.h lines: 108-108
  6. // std::vector< const MatchExpression* > _subs;
  7. proto._subs = undefined;
  8. // File: expression_array.h lines: 108-108
  9. // std::vector< const MatchExpression* > _subs;
  10. proto._subs = undefined;
  11. /**
  12. *
  13. * This documentation was automatically generated. Please update when you touch this function.
  14. * @method ElemMatchValueMatchExpression
  15. * @param
  16. *
  17. */
  18. proto.ElemMatchValueMatchExpression = function ElemMatchValueMatchExpression( /* ELEM_MATCH_VALUE */ ){
  19. // File: expression_array.h lines: 82-81
  20. // ElemMatchValueMatchExpression() : ArrayMatchingMatchExpression( ELEM_MATCH_VALUE ){}
  21. }
  22. /**
  23. *
  24. * This documentation was automatically generated. Please update when you touch this function.
  25. * @method _arrayElementMatchesAll
  26. * @param
  27. *
  28. */
  29. proto._arrayElementMatchesAll = function _arrayElementMatchesAll( /* const BSONElement& e */ ){
  30. // File: expression_array.cpp lines: 152-157
  31. // bool ElemMatchValueMatchExpression::_arrayElementMatchesAll( const BSONElement& e ) const {
  32. // for ( unsigned i = 0; i < _subs.size(); i++ ) {
  33. // if ( !_subs[i]->matchesSingleElement( e ) )
  34. // return false;
  35. // }
  36. // return true;
  37. // }
  38. }
  39. /**
  40. *
  41. * This documentation was automatically generated. Please update when you touch this function.
  42. * @method add
  43. * @param
  44. *
  45. */
  46. proto.add = function add( /* const MatchExpression* sub */ ){
  47. // File: expression_array.cpp lines: 132-134
  48. // void ElemMatchValueMatchExpression::add( const MatchExpression* sub ) {
  49. // verify( sub );
  50. // _subs.push_back( sub );
  51. // }
  52. }
  53. /**
  54. *
  55. * This documentation was automatically generated. Please update when you touch this function.
  56. * @method debugString
  57. * @param
  58. *
  59. */
  60. proto.debugString = function debugString( /* StringBuilder& debug, int level */ ){
  61. // File: expression_array.cpp lines: 160-165
  62. // void ElemMatchValueMatchExpression::debugString( StringBuilder& debug, int level ) const {
  63. // _debugAddSpace( debug, level );
  64. // debug << path() << " $elemMatch\n";
  65. // for ( unsigned i = 0; i < _subs.size(); i++ ) {
  66. // _subs[i]->debugString( debug, level + 1 );
  67. // }
  68. // }
  69. }
  70. /**
  71. *
  72. * This documentation was automatically generated. Please update when you touch this function.
  73. * @method getChild
  74. * @param
  75. *
  76. */
  77. proto.getChild = function getChild( /* size_t i */ ){
  78. // File: expression_array.h lines: 103-102
  79. // virtual const MatchExpression* getChild( size_t i ) const { return _subs[i]; }
  80. }
  81. /**
  82. *
  83. * This documentation was automatically generated. Please update when you touch this function.
  84. * @method init
  85. * @param
  86. *
  87. */
  88. proto.init = function init( /* const StringData& path, const MatchExpression* sub */ ){
  89. // File: expression_array.cpp lines: 121-124
  90. // Status ElemMatchValueMatchExpression::init( const StringData& path, const MatchExpression* sub ) {
  91. // init( path );
  92. // add( sub );
  93. // return Status::OK();
  94. // }
  95. }
  96. /**
  97. *
  98. * This documentation was automatically generated. Please update when you touch this function.
  99. * @method matchesArray
  100. * @param
  101. *
  102. */
  103. proto.matchesArray = function matchesArray( /* const BSONObj& anArray, MatchDetails* details */ ){
  104. // File: expression_array.cpp lines: 137-149
  105. // bool ElemMatchValueMatchExpression::matchesArray( const BSONObj& anArray, MatchDetails* details ) const {
  106. // BSONObjIterator i( anArray );
  107. // while ( i.more() ) {
  108. // BSONElement inner = i.next();
  109. //
  110. // if ( _arrayElementMatchesAll( inner ) ) {
  111. // if ( details && details->needRecord() ) {
  112. // details->setElemMatchKey( inner.fieldName() );
  113. // }
  114. // return true;
  115. // }
  116. // }
  117. // return false;
  118. // }
  119. }
  120. /**
  121. *
  122. * This documentation was automatically generated. Please update when you touch this function.
  123. * @method numChildren
  124. * @param
  125. *
  126. */
  127. proto.numChildren = function numChildren( /* */ ){
  128. // File: expression_array.h lines: 102-101
  129. // virtual size_t numChildren() const { return _subs.size(); }
  130. }
  131. /**
  132. *
  133. * This documentation was automatically generated. Please update when you touch this function.
  134. * @method shallowClone
  135. * @param
  136. *
  137. */
  138. proto.shallowClone = function shallowClone( /* */ ){
  139. // File: expression_array.h lines: 91-97
  140. // virtual ElemMatchValueMatchExpression* shallowClone() const {
  141. // ElemMatchValueMatchExpression* e = new ElemMatchValueMatchExpression();
  142. // e->init(path());
  143. // for (size_t i = 0; i < _subs.size(); ++i) {
  144. // e->add(_subs[i]->shallowClone());
  145. // }
  146. // return e;
  147. // }
  148. }
  149. /**
  150. *
  151. * This documentation was automatically generated. Please update when you touch this function.
  152. * @method ~ElemMatchValueMatchExpression
  153. * @param
  154. *
  155. */
  156. proto.~ElemMatchValueMatchExpression = function ~ElemMatchValueMatchExpression( /* */ ){
  157. // File: expression_array.cpp lines: 115-118
  158. // ElemMatchValueMatchExpression::~ElemMatchValueMatchExpression() {
  159. // for ( unsigned i = 0; i < _subs.size(); i++ )
  160. // delete _subs[i];
  161. // _subs.clear();
  162. // }
  163. }