plant_PW.mvc 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. SimpleClassDiagrams Plant_PW{
  2. SimpleAttribute String {
  3. constraint = $
  4. String function constraint(model : Element, name : String):
  5. if (is_physical_string(model["model"][name])):
  6. return "OK"!
  7. else:
  8. return "String has non-string value"!
  9. $
  10. }
  11. Class Rocker : Movement {}
  12. Class PushPull : Movement {}
  13. Class Movement : Switch {}
  14. Class Switch : Named {}
  15. Class LockOut : Switch {}
  16. Class Port {}
  17. Class Boundary : Named {}
  18. Class PowerWindow : Named{}
  19. Class Side : PowerWindow{}
  20. Class Roof : PowerWindow{}
  21. Class Named {
  22. name : String
  23. }
  24. Class Sensor : Named {}
  25. Class Infrared : Sensor {}
  26. Class ForceDetecting : Sensor {}
  27. Association ConnectSwitch (Port, Switch) {}
  28. Association has1 (Boundary, Switch) {}
  29. Association Controls (Movement, PowerWindow) {}
  30. Association HasSwitch (PowerWindow, Switch) {}
  31. Association Locks (LockOut, PowerWindow) {}
  32. Association HasSensor (PowerWindow, Sensor) {}
  33. Association Around (Boundary, PowerWindow) {}
  34. Association Interface (Boundary, Port) {}
  35. Association ConnectSensor (Port, Sensor) {}
  36. Association has2 (Boundary, Sensor) {}
  37. }