ObjectEntry.js 3.5 KB

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