ProgramAttribute.js 1.4 KB

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