ProgramAttribute.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. function ProgramAttribute() {
  2. Object.defineProperties(this, {
  3. 'size': { enumerable: true, configurable: true, get: ProgramAttribute.prototype.__get_size, set: ProgramAttribute.prototype.__set_size},
  4. 'name': { enumerable: true, configurable: true, get: ProgramAttribute.prototype.__get_name, set: ProgramAttribute.prototype.__set_name},
  5. 'arrayType': { enumerable: true, configurable: true, get: ProgramAttribute.prototype.__get_arrayType, set: ProgramAttribute.prototype.__set_arrayType}
  6. })
  7. }
  8. ProgramAttribute.prototype.__get_size = function() {
  9. return Polycode.ProgramAttribute__get_size(this.__ptr)
  10. }
  11. ProgramAttribute.prototype.__set_size = function(val) {
  12. Polycode.ProgramAttribute__set_size(this.__ptr, val)
  13. }
  14. ProgramAttribute.prototype.__get_name = function() {
  15. return Polycode.ProgramAttribute__get_name(this.__ptr)
  16. }
  17. ProgramAttribute.prototype.__set_name = function(val) {
  18. Polycode.ProgramAttribute__set_name(this.__ptr, val)
  19. }
  20. ProgramAttribute.prototype.__get_arrayType = function() {
  21. return Polycode.ProgramAttribute__get_arrayType(this.__ptr)
  22. }
  23. ProgramAttribute.prototype.__set_arrayType = function(val) {
  24. Polycode.ProgramAttribute__set_arrayType(this.__ptr, val)
  25. }
  26. Duktape.fin(ProgramAttribute.prototype, function (x) {
  27. if (x === ProgramAttribute.prototype) {
  28. return;
  29. }
  30. Polycode.ProgramAttribute__delete(x.__ptr)
  31. })