AtomicMatchExpression.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. "use strict";
  2. var MatchExpression = require('./MatchExpression');
  3. // Autogenerated by cport.py on 2013-09-17 14:37
  4. var AtomicMatchExpression = module.exports = function AtomicMatchExpression(){
  5. base.call(this);
  6. this._matchType = 'ATOMIC';
  7. }, klass = AtomicMatchExpression, base = MatchExpression, proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
  8. /**
  9. *
  10. * Writes a debug string for this object
  11. * @method debugString
  12. * @param level
  13. *
  14. */
  15. proto.debugString = function debugString(level) {
  16. // File: expression.cpp lines: 48-50
  17. return this._debugAddSpace( level ) + "$atomic\n";
  18. };
  19. /**
  20. *
  21. * checks if this expression is == to the other
  22. * @method equivalent
  23. * @param other
  24. *
  25. */
  26. proto.equivalent = function equivalent(other) {
  27. // File: expression.h lines: 198-199
  28. return other._matchType == 'ATOMIC';
  29. };
  30. /**
  31. *
  32. * matches checks the input doc against the internal element path to see if it is a match
  33. * @method matches
  34. * @param doc
  35. *
  36. */
  37. proto.matches = function matches(doc) {
  38. // File: expression.h lines: 184-185
  39. return true;
  40. };
  41. /**
  42. *
  43. * Check if the input element matches
  44. * @method matchesSingleElement
  45. * @param e
  46. *
  47. */
  48. proto.matchesSingleElement = function matchesSingleElement(e) {
  49. // File: expression.h lines: 188-189
  50. return true;
  51. };
  52. /**
  53. *
  54. * clone this instance to a new one
  55. * @method shallowClone
  56. *
  57. */
  58. proto.shallowClone = function shallowClone(){
  59. // File: expression.h lines: 192-193
  60. return new AtomicMatchExpression();
  61. };