ObjectEntry.js 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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.UNKNOWN_ENTRY = - 1
  16. ObjectEntry.FLOAT_ENTRY = 0
  17. ObjectEntry.INT_ENTRY = 1
  18. ObjectEntry.BOOL_ENTRY = 2
  19. ObjectEntry.ARRAY_ENTRY = 3
  20. ObjectEntry.STRING_ENTRY = 4
  21. ObjectEntry.CONTAINER_ENTRY = 5
  22. ObjectEntry.prototype.__get_type = function() {
  23. return Polycode.ObjectEntry__get_type(this.__ptr)
  24. }
  25. ObjectEntry.prototype.__set_type = function(val) {
  26. Polycode.ObjectEntry__set_type(this.__ptr, val)
  27. }
  28. ObjectEntry.prototype.__get_name = function() {
  29. return Polycode.ObjectEntry__get_name(this.__ptr)
  30. }
  31. ObjectEntry.prototype.__set_name = function(val) {
  32. Polycode.ObjectEntry__set_name(this.__ptr, val)
  33. }
  34. ObjectEntry.prototype.__get_NumberVal = function() {
  35. return Polycode.ObjectEntry__get_NumberVal(this.__ptr)
  36. }
  37. ObjectEntry.prototype.__set_NumberVal = function(val) {
  38. Polycode.ObjectEntry__set_NumberVal(this.__ptr, val)
  39. }
  40. ObjectEntry.prototype.__get_intVal = function() {
  41. return Polycode.ObjectEntry__get_intVal(this.__ptr)
  42. }
  43. ObjectEntry.prototype.__set_intVal = function(val) {
  44. Polycode.ObjectEntry__set_intVal(this.__ptr, val)
  45. }
  46. ObjectEntry.prototype.__get_stringVal = function() {
  47. return Polycode.ObjectEntry__get_stringVal(this.__ptr)
  48. }
  49. ObjectEntry.prototype.__set_stringVal = function(val) {
  50. Polycode.ObjectEntry__set_stringVal(this.__ptr, val)
  51. }
  52. ObjectEntry.prototype.__get_boolVal = function() {
  53. return Polycode.ObjectEntry__get_boolVal(this.__ptr)
  54. }
  55. ObjectEntry.prototype.__set_boolVal = function(val) {
  56. Polycode.ObjectEntry__set_boolVal(this.__ptr, val)
  57. }
  58. ObjectEntry.prototype.__get_length = function() {
  59. return Polycode.ObjectEntry__get_length(this.__ptr)
  60. }
  61. ObjectEntry.prototype.__set_length = function(val) {
  62. Polycode.ObjectEntry__set_length(this.__ptr, val)
  63. }
  64. Duktape.fin(ObjectEntry.prototype, function (x) {
  65. if (x === ObjectEntry.prototype) {
  66. return;
  67. }
  68. Polycode.ObjectEntry__delete(x.__ptr)
  69. })
  70. ObjectEntry.prototype.getTypedName = function() {
  71. return Polycode.ObjectEntry_getTypedName(this.__ptr)
  72. }
  73. ObjectEntry.prototype.setTypedName = function(str) {
  74. Polycode.ObjectEntry_setTypedName(this.__ptr, str)
  75. }
  76. ObjectEntry.prototype.Clear = function() {
  77. Polycode.ObjectEntry_Clear(this.__ptr)
  78. }