EDMMSimplePDLPackage.tom 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. %typeterm Event extends SPDLSimEvent {
  2. implement { SimplePDLSemantics.EDMMSimplePDL.Event }
  3. is_sort(t) { $t instanceof SimplePDLSemantics.EDMMSimplePDL.Event }
  4. equals(l1,l2) { $l1.equals($l2) }
  5. }
  6. %include { boolean.tom }
  7. %include { int.tom }
  8. %typeterm WorkDefinitionEvent extends Event {
  9. implement { SimplePDLSemantics.EDMMSimplePDL.WorkDefinitionEvent }
  10. is_sort(t) { $t instanceof SimplePDLSemantics.EDMMSimplePDL.WorkDefinitionEvent }
  11. equals(l1,l2) { $l1.equals($l2) }
  12. }
  13. %typeterm StartWD extends WorkDefinitionEvent {
  14. implement { SimplePDLSemantics.EDMMSimplePDL.StartWD }
  15. is_sort(t) { $t instanceof SimplePDLSemantics.EDMMSimplePDL.StartWD }
  16. equals(l1,l2) { $l1.equals($l2) }
  17. }
  18. %op StartWD StartWD(internal : boolean, date : int, name : String, workdefinition : WorkDefinition) {
  19. is_fsym(t) { $t instanceof SimplePDLSemantics.EDMMSimplePDL.StartWD }
  20. get_slot(internal, t) { (java.lang.Boolean)$t.eGet($t.eClass().getEStructuralFeature("internal")) }
  21. get_slot(date, t) { (java.lang.Integer)$t.eGet($t.eClass().getEStructuralFeature("date")) }
  22. get_slot(name, t) { (java.lang.String)$t.eGet($t.eClass().getEStructuralFeature("name")) }
  23. get_slot(workdefinition, t) { (SimplePDLSemantics.DDMMSimplePDL.WorkDefinition)$t.eGet($t.eClass().getEStructuralFeature("workdefinition")) }
  24. get_default(internal) { false }
  25. get_default(date) { 0 }
  26. get_default(name) { "" }
  27. make(internal, date, name, workdefinition) { constructStartWD((SimplePDLSemantics.EDMMSimplePDL.StartWD)SimplePDLSemantics.EDMMSimplePDL.EDMMSimplePDLFactory.eINSTANCE.create((EClass)SimplePDLSemantics.EDMMSimplePDL.EDMMSimplePDLPackage.eINSTANCE.getEClassifier("StartWD")), new Object[]{ $internal, $date, $name, $workdefinition }) }
  28. implement() { SimplePDLSemantics.EDMMSimplePDL.impl.StartWDImpl }
  29. }
  30. public static <O extends org.eclipse.emf.ecore.EObject> O constructStartWD(O o, Object[] objs) {
  31. int i=0;
  32. EList<EStructuralFeature> sfes = o.eClass().getEAllStructuralFeatures();
  33. for(EStructuralFeature esf : sfes) {
  34. if(esf.isChangeable()) {
  35. o.eSet(esf, objs[i]);
  36. i++;
  37. }
  38. }
  39. return o;
  40. }
  41. %typeterm FinishWD extends WorkDefinitionEvent {
  42. implement { SimplePDLSemantics.EDMMSimplePDL.FinishWD }
  43. is_sort(t) { $t instanceof SimplePDLSemantics.EDMMSimplePDL.FinishWD }
  44. equals(l1,l2) { $l1.equals($l2) }
  45. }
  46. %op FinishWD FinishWD(internal : boolean, date : int, name : String, workdefinition : WorkDefinition) {
  47. is_fsym(t) { $t instanceof SimplePDLSemantics.EDMMSimplePDL.FinishWD }
  48. get_slot(internal, t) { (java.lang.Boolean)$t.eGet($t.eClass().getEStructuralFeature("internal")) }
  49. get_slot(date, t) { (java.lang.Integer)$t.eGet($t.eClass().getEStructuralFeature("date")) }
  50. get_slot(name, t) { (java.lang.String)$t.eGet($t.eClass().getEStructuralFeature("name")) }
  51. get_slot(workdefinition, t) { (SimplePDLSemantics.DDMMSimplePDL.WorkDefinition)$t.eGet($t.eClass().getEStructuralFeature("workdefinition")) }
  52. get_default(internal) { false }
  53. get_default(date) { 0 }
  54. get_default(name) { "" }
  55. make(internal, date, name, workdefinition) { constructFinishWD((SimplePDLSemantics.EDMMSimplePDL.FinishWD)SimplePDLSemantics.EDMMSimplePDL.EDMMSimplePDLFactory.eINSTANCE.create((EClass)SimplePDLSemantics.EDMMSimplePDL.EDMMSimplePDLPackage.eINSTANCE.getEClassifier("FinishWD")), new Object[]{ $internal, $date, $name, $workdefinition }) }
  56. implement() { SimplePDLSemantics.EDMMSimplePDL.impl.FinishWDImpl }
  57. }
  58. public static <O extends org.eclipse.emf.ecore.EObject> O constructFinishWD(O o, Object[] objs) {
  59. int i=0;
  60. EList<EStructuralFeature> sfes = o.eClass().getEAllStructuralFeatures();
  61. for(EStructuralFeature esf : sfes) {
  62. if(esf.isChangeable()) {
  63. o.eSet(esf, objs[i]);
  64. i++;
  65. }
  66. }
  67. return o;
  68. }