Cmd.js 437 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * Created by Daniel on 20.07.15.
  3. */
  4. Cmd = function () {
  5. this.id = -1;
  6. this.serialized = false;
  7. this.updatable = false;
  8. this.type = '';
  9. this.name = '';
  10. };
  11. Cmd.prototype.toJSON = function () {
  12. var output = {};
  13. output.type = this.type;
  14. output.id = this.id;
  15. output.name = this.name;
  16. return output;
  17. };
  18. Cmd.prototype.fromJSON = function ( json ) {
  19. this.type = json.type;
  20. this.id = json.id;
  21. this.name = json.name;
  22. };