ElemMatchObjectMatchExpression.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. "use strict"
  2. // Autogenerated by cport.py on 2013-09-17 14:37
  3. var ElemMatchObjectMatchExpression = module.exports = function (){
  4. }, klass = ElemMatchObjectMatchExpression, base = Object , proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
  5. // File: expression_array.h lines: 77-77
  6. // boost::scoped_ptr<const MatchExpression> _sub;
  7. proto._sub = undefined;
  8. // File: expression_array.h lines: 77-77
  9. // boost::scoped_ptr<const MatchExpression> _sub;
  10. proto._sub = undefined;
  11. /**
  12. *
  13. * This documentation was automatically generated. Please update when you touch this function.
  14. * @method ElemMatchObjectMatchExpression
  15. * @param
  16. *
  17. */
  18. proto.ElemMatchObjectMatchExpression = function ElemMatchObjectMatchExpression( /* ELEM_MATCH_OBJECT */ ){
  19. // File: expression_array.h lines: 60-59
  20. // ElemMatchObjectMatchExpression() : ArrayMatchingMatchExpression( ELEM_MATCH_OBJECT ){}
  21. }
  22. /**
  23. *
  24. * This documentation was automatically generated. Please update when you touch this function.
  25. * @method debugString
  26. * @param
  27. *
  28. */
  29. proto.debugString = function debugString( /* StringBuilder& debug, int level */ ){
  30. // File: expression_array.cpp lines: 106-109
  31. // void ElemMatchObjectMatchExpression::debugString( StringBuilder& debug, int level ) const {
  32. // _debugAddSpace( debug, level );
  33. // debug << path() << " $elemMatch\n";
  34. // _sub->debugString( debug, level + 1 );
  35. // }
  36. }
  37. /**
  38. *
  39. * This documentation was automatically generated. Please update when you touch this function.
  40. * @method getChild
  41. * @param
  42. *
  43. */
  44. proto.getChild = function getChild( /* size_t i */ ){
  45. // File: expression_array.h lines: 74-73
  46. // virtual const MatchExpression* getChild( size_t i ) const { return _sub.get(); }
  47. }
  48. /**
  49. *
  50. * This documentation was automatically generated. Please update when you touch this function.
  51. * @method init
  52. * @param
  53. *
  54. */
  55. proto.init = function init( /* const StringData& path, const MatchExpression* sub */ ){
  56. // File: expression_array.cpp lines: 85-87
  57. // Status ElemMatchObjectMatchExpression::init( const StringData& path, const MatchExpression* sub ) {
  58. // _sub.reset( sub );
  59. // return initPath( path );
  60. // }
  61. }
  62. /**
  63. *
  64. * This documentation was automatically generated. Please update when you touch this function.
  65. * @method matchesArray
  66. * @param
  67. *
  68. */
  69. proto.matchesArray = function matchesArray( /* const BSONObj& anArray, MatchDetails* details */ ){
  70. // File: expression_array.cpp lines: 90-103
  71. // bool ElemMatchObjectMatchExpression::matchesArray( const BSONObj& anArray, MatchDetails* details ) const {
  72. // BSONObjIterator i( anArray );
  73. // while ( i.more() ) {
  74. // BSONElement inner = i.next();
  75. // if ( !inner.isABSONObj() )
  76. // continue;
  77. // if ( _sub->matchesBSON( inner.Obj(), NULL ) ) {
  78. // if ( details && details->needRecord() ) {
  79. // details->setElemMatchKey( inner.fieldName() );
  80. // }
  81. // return true;
  82. // }
  83. // }
  84. // return false;
  85. // }
  86. }
  87. /**
  88. *
  89. * This documentation was automatically generated. Please update when you touch this function.
  90. * @method numChildren
  91. * @param
  92. *
  93. */
  94. proto.numChildren = function numChildren( /* */ ){
  95. // File: expression_array.h lines: 73-72
  96. // virtual size_t numChildren() const { return 1; }
  97. }
  98. /**
  99. *
  100. * This documentation was automatically generated. Please update when you touch this function.
  101. * @method shallowClone
  102. * @param
  103. *
  104. */
  105. proto.shallowClone = function shallowClone( /* */ ){
  106. // File: expression_array.h lines: 65-68
  107. // virtual ElemMatchObjectMatchExpression* shallowClone() const {
  108. // ElemMatchObjectMatchExpression* e = new ElemMatchObjectMatchExpression();
  109. // e->init(path(), _sub->shallowClone());
  110. // return e;
  111. // }
  112. }