MatchDetails.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. "use strict";
  2. // Autogenerated by cport.py on 2013-09-17 14:37
  3. var MatchDetails = module.exports = function (){
  4. // File: match_details.cpp lines: 27-29
  5. this._elemMatchKeyRequested = false;
  6. this.resetOutput();
  7. }, klass = MatchDetails, base = Object , proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
  8. // File: match_details.h lines: 60-60
  9. proto._elemMatchKey = undefined;
  10. // File: match_details.h lines: 59-59
  11. proto._elemMatchKeyRequested = undefined;
  12. // File: match_details.h lines: 58-58
  13. proto._loadedRecord = undefined;
  14. /**
  15. *
  16. * Return the _elemMatchKey property
  17. * @method elemMatchKey
  18. *
  19. */
  20. proto.elemMatchKey = function elemMatchKey(){
  21. // File: match_details.cpp lines: 41-43
  22. if (!this.hasElemMatchKey()) throw new Error("no elem match key MatchDetails:29");
  23. return this._elemMatchKey;
  24. };
  25. /**
  26. *
  27. * Return the _elemMatchKey property so we can check if exists
  28. * @method hasElemMatchKey
  29. *
  30. */
  31. proto.hasElemMatchKey = function hasElemMatchKey(){
  32. // File: match_details.cpp lines: 37-38
  33. return this._elemMatchKey;
  34. };
  35. /**
  36. *
  37. * Return the _loadedRecord property
  38. * @method hasLoadedRecord
  39. *
  40. */
  41. proto.hasLoadedRecord = function hasLoadedRecord(){
  42. // File: match_details.h lines: 41-40
  43. return this._loadedRecord;
  44. };
  45. /**
  46. *
  47. * Return the _elemMatchKeyRequested property
  48. * @method needRecord
  49. *
  50. */
  51. proto.needRecord = function needRecord(){
  52. // File: match_details.h lines: 45-44
  53. return this._elemMatchKeyRequested;
  54. };
  55. /**
  56. *
  57. * Set the _elemMatchKeyRequested property to true
  58. * @method requestElemMatchKey
  59. *
  60. */
  61. proto.requestElemMatchKey = function requestElemMatchKey(){
  62. // File: match_details.h lines: 50-49
  63. this._elemMatchKeyRequested = true;
  64. };
  65. /**
  66. *
  67. * Set _loadedRecord to false and _elemMatchKey to undefined
  68. * @method resetOutput
  69. *
  70. */
  71. proto.resetOutput = function resetOutput(){
  72. // File: match_details.cpp lines: 32-34
  73. this._loadedRecord = false;
  74. this._elemMatchKey = undefined;
  75. };
  76. /**
  77. *
  78. * If we request an _elemMatchKey then set it to the input
  79. * @method setElemMatchKey
  80. * @param elemMatchKey
  81. *
  82. */
  83. proto.setElemMatchKey = function setElemMatchKey(elemMatchKey){
  84. // File: match_details.cpp lines: 46-49
  85. if ( this._elemMatchKeyRequested ) {
  86. this._elemMatchKey = elemMatchKey;
  87. }
  88. };
  89. /**
  90. *
  91. * Set the _loadedRecord property
  92. * @method setLoadedRecord
  93. * @param loadedRecord
  94. *
  95. */
  96. proto.setLoadedRecord = function setLoadedRecord(loadedRecord){
  97. // File: match_details.h lines: 39-38
  98. this._loadedRecord = loadedRecord;
  99. };
  100. /**
  101. *
  102. * Return a string representation of ourselves
  103. * @method toString
  104. *
  105. */
  106. proto.toString = function toString(){
  107. // File: match_details.cpp lines: 52-57
  108. return "loadedRecord: " + this._loadedRecord + " " + "elemMatchKeyRequested: " + this._elemMatchKeyRequested + " " + "elemMatchKey: " + ( this._elemMatchKey ? this._elemMatchKey : "NONE" ) + " ";
  109. };