LeafMatchExpression.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. "use strict"
  2. // Autogenerated by cport.py on 2013-09-17 14:37
  3. var LeafMatchExpression = module.exports = function (){
  4. }, klass = LeafMatchExpression, base = Object , proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
  5. // File: expression_leaf.h lines: 63-63
  6. // ElementPath _elementPath;
  7. proto._elementPath = undefined;
  8. // File: expression_leaf.h lines: 62-62
  9. // StringData _path;
  10. proto._path = undefined;
  11. // File: expression_leaf.h lines: 63-63
  12. // ElementPath _elementPath;
  13. proto._elementPath = undefined;
  14. // File: expression_leaf.h lines: 62-62
  15. // StringData _path;
  16. proto._path = undefined;
  17. /**
  18. *
  19. * This documentation was automatically generated. Please update when you touch this function.
  20. * @method LeafMatchExpression
  21. * @param
  22. *
  23. */
  24. proto.LeafMatchExpression = function LeafMatchExpression( /* MatchType matchType */ ){
  25. // File: expression_leaf.h lines: 46-47
  26. // LeafMatchExpression( MatchType matchType )
  27. // : MatchExpression( matchType ) {
  28. // }
  29. }
  30. /**
  31. *
  32. * This documentation was automatically generated. Please update when you touch this function.
  33. * @method initPath
  34. * @param
  35. *
  36. */
  37. proto.initPath = function initPath( /* const StringData& path */ ){
  38. // File: expression_leaf.cpp lines: 31-33
  39. // Status LeafMatchExpression::initPath( const StringData& path ) {
  40. // _path = path;
  41. // return _elementPath.init( _path );
  42. // }
  43. }
  44. /**
  45. *
  46. * This documentation was automatically generated. Please update when you touch this function.
  47. * @method matches
  48. * @param
  49. *
  50. */
  51. proto.matches = function matches( /* const MatchableDocument* doc, MatchDetails* details */ ){
  52. // File: expression_leaf.cpp lines: 37-48
  53. // bool LeafMatchExpression::matches( const MatchableDocument* doc, MatchDetails* details ) const {
  54. // boost::scoped_ptr<ElementIterator> cursor( doc->getIterator( _elementPath ) );
  55. // while ( cursor->more() ) {
  56. // ElementIterator::Context e = cursor->next();
  57. // if ( !matchesSingleElement( e.element() ) )
  58. // continue;
  59. // if ( details && details->needRecord() && !e.arrayOffset().eoo() ) {
  60. // details->setElemMatchKey( e.arrayOffset().fieldName() );
  61. // }
  62. // return true;
  63. // }
  64. // return false;
  65. // }
  66. }
  67. /**
  68. *
  69. * This documentation was automatically generated. Please update when you touch this function.
  70. * @method path
  71. * @param
  72. *
  73. */
  74. proto.path = function path( /* */ ){
  75. // File: expression_leaf.h lines: 56-55
  76. // virtual const StringData path() const { return _path; }
  77. }
  78. /**
  79. *
  80. * This documentation was automatically generated. Please update when you touch this function.
  81. * @method ~LeafMatchExpression
  82. * @param
  83. *
  84. */
  85. proto.~LeafMatchExpression = function ~LeafMatchExpression( /* */ ){
  86. // File: expression_leaf.h lines: 50-49
  87. // virtual ~LeafMatchExpression(){}
  88. }