Cmd.js 370 B

12345678910111213141516171819202122232425262728
  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. };
  10. Cmd.prototype.toJSON = function () {
  11. var output = {};
  12. output.type = this.type;
  13. output.id = this.id;
  14. return output;
  15. };
  16. Cmd.prototype.fromJSON = function ( json ) {
  17. this.type = json.type;
  18. this.id = json.id;
  19. };