ConfigEntry.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. function ConfigEntry() {
  2. Object.defineProperties(this, {
  3. 'key': { enumerable: true, configurable: true, get: ConfigEntry.prototype.__get_key, set: ConfigEntry.prototype.__set_key},
  4. 'configNamespace': { enumerable: true, configurable: true, get: ConfigEntry.prototype.__get_configNamespace, set: ConfigEntry.prototype.__set_configNamespace},
  5. 'numVal': { enumerable: true, configurable: true, get: ConfigEntry.prototype.__get_numVal, set: ConfigEntry.prototype.__set_numVal},
  6. 'stringVal': { enumerable: true, configurable: true, get: ConfigEntry.prototype.__get_stringVal, set: ConfigEntry.prototype.__set_stringVal},
  7. 'isString': { enumerable: true, configurable: true, get: ConfigEntry.prototype.__get_isString, set: ConfigEntry.prototype.__set_isString}
  8. })
  9. }
  10. ConfigEntry.prototype.__get_key = function() {
  11. return Polycode.ConfigEntry__get_key(this.__ptr)
  12. }
  13. ConfigEntry.prototype.__set_key = function(val) {
  14. Polycode.ConfigEntry__set_key(this.__ptr, val)
  15. }
  16. ConfigEntry.prototype.__get_configNamespace = function() {
  17. return Polycode.ConfigEntry__get_configNamespace(this.__ptr)
  18. }
  19. ConfigEntry.prototype.__set_configNamespace = function(val) {
  20. Polycode.ConfigEntry__set_configNamespace(this.__ptr, val)
  21. }
  22. ConfigEntry.prototype.__get_numVal = function() {
  23. return Polycode.ConfigEntry__get_numVal(this.__ptr)
  24. }
  25. ConfigEntry.prototype.__set_numVal = function(val) {
  26. Polycode.ConfigEntry__set_numVal(this.__ptr, val)
  27. }
  28. ConfigEntry.prototype.__get_stringVal = function() {
  29. return Polycode.ConfigEntry__get_stringVal(this.__ptr)
  30. }
  31. ConfigEntry.prototype.__set_stringVal = function(val) {
  32. Polycode.ConfigEntry__set_stringVal(this.__ptr, val)
  33. }
  34. ConfigEntry.prototype.__get_isString = function() {
  35. return Polycode.ConfigEntry__get_isString(this.__ptr)
  36. }
  37. ConfigEntry.prototype.__set_isString = function(val) {
  38. Polycode.ConfigEntry__set_isString(this.__ptr, val)
  39. }
  40. Duktape.fin(ConfigEntry.prototype, function (x) {
  41. if (x === ConfigEntry.prototype) {
  42. return;
  43. }
  44. Polycode.ConfigEntry__delete(x.__ptr)
  45. })