ObjectEntry.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. function ObjectEntry() {
  2. Object.defineProperties(this, {
  3. 'type': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_type, set: ObjectEntry.prototype.__set_type},
  4. 'name': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_name, set: ObjectEntry.prototype.__set_name},
  5. 'NumberVal': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_NumberVal, set: ObjectEntry.prototype.__set_NumberVal},
  6. 'intVal': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_intVal, set: ObjectEntry.prototype.__set_intVal},
  7. 'stringVal': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_stringVal, set: ObjectEntry.prototype.__set_stringVal},
  8. 'boolVal': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_boolVal, set: ObjectEntry.prototype.__set_boolVal},
  9. 'length': { enumerable: true, configurable: true, get: ObjectEntry.prototype.__get_length, set: ObjectEntry.prototype.__set_length}
  10. })
  11. }
  12. ObjectEntry.prototype.__get_type = function() {
  13. return Polycode.ObjectEntry__get_type(this.__ptr)
  14. }
  15. ObjectEntry.prototype.__set_type = function(val) {
  16. Polycode.ObjectEntry__set_type(this.__ptr, val)
  17. }
  18. ObjectEntry.prototype.__get_name = function() {
  19. return Polycode.ObjectEntry__get_name(this.__ptr)
  20. }
  21. ObjectEntry.prototype.__set_name = function(val) {
  22. Polycode.ObjectEntry__set_name(this.__ptr, val)
  23. }
  24. ObjectEntry.prototype.__get_NumberVal = function() {
  25. return Polycode.ObjectEntry__get_NumberVal(this.__ptr)
  26. }
  27. ObjectEntry.prototype.__set_NumberVal = function(val) {
  28. Polycode.ObjectEntry__set_NumberVal(this.__ptr, val)
  29. }
  30. ObjectEntry.prototype.__get_intVal = function() {
  31. return Polycode.ObjectEntry__get_intVal(this.__ptr)
  32. }
  33. ObjectEntry.prototype.__set_intVal = function(val) {
  34. Polycode.ObjectEntry__set_intVal(this.__ptr, val)
  35. }
  36. ObjectEntry.prototype.__get_stringVal = function() {
  37. return Polycode.ObjectEntry__get_stringVal(this.__ptr)
  38. }
  39. ObjectEntry.prototype.__set_stringVal = function(val) {
  40. Polycode.ObjectEntry__set_stringVal(this.__ptr, val)
  41. }
  42. ObjectEntry.prototype.__get_boolVal = function() {
  43. return Polycode.ObjectEntry__get_boolVal(this.__ptr)
  44. }
  45. ObjectEntry.prototype.__set_boolVal = function(val) {
  46. Polycode.ObjectEntry__set_boolVal(this.__ptr, val)
  47. }
  48. ObjectEntry.prototype.__get_length = function() {
  49. return Polycode.ObjectEntry__get_length(this.__ptr)
  50. }
  51. ObjectEntry.prototype.__set_length = function(val) {
  52. Polycode.ObjectEntry__set_length(this.__ptr, val)
  53. }
  54. Duktape.fin(ObjectEntry.prototype, function (x) {
  55. if (x === ObjectEntry.prototype) {
  56. return;
  57. }
  58. Polycode.ObjectEntry__delete(x.__ptr)
  59. })
  60. ObjectEntry.prototype.readNumber = function(key,out) {
  61. return Polycode.ObjectEntry_readNumber(this.__ptr, key,out)
  62. }
  63. ObjectEntry.prototype.readString = function(key,out) {
  64. return Polycode.ObjectEntry_readString(this.__ptr, key,out)
  65. }
  66. ObjectEntry.prototype.readBool = function(key,out) {
  67. return Polycode.ObjectEntry_readBool(this.__ptr, key,out)
  68. }
  69. ObjectEntry.prototype.addChild = function(name) {
  70. var retVal = new ObjectEntry()
  71. retVal.__ptr = Polycode.ObjectEntry_addChild(this.__ptr, name)
  72. return retVal
  73. }
  74. ObjectEntry.prototype.getTypedName = function() {
  75. return Polycode.ObjectEntry_getTypedName(this.__ptr)
  76. }
  77. ObjectEntry.prototype.setTypedName = function(str) {
  78. Polycode.ObjectEntry_setTypedName(this.__ptr, str)
  79. }
  80. ObjectEntry.prototype.Clear = function() {
  81. Polycode.ObjectEntry_Clear(this.__ptr)
  82. }