MM_render.mvc 1011 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. include "primitives.alh"
  2. SimpleAttribute Integer {
  3. constraint = $
  4. String function constraint(value : Element):
  5. if (is_physical_int(value)):
  6. return "OK"!
  7. else:
  8. return "Integer has a non-integer value"!
  9. $
  10. }
  11. SimpleAttribute String {
  12. constraint = $
  13. String function constraint(value : Element):
  14. if (is_physical_string(value)):
  15. return "OK"!
  16. else:
  17. return "String has a non-string value"!
  18. $
  19. }
  20. Class GraphicalElement {
  21. name = "GraphicalElement"
  22. x : Integer
  23. y : Integer
  24. }
  25. Class Symbol : GraphicalElement {
  26. name = "Icon"
  27. typeID : String
  28. __asid : String
  29. }
  30. Class TextLabel : GraphicalElement {
  31. name = "TextLabel"
  32. text : String
  33. }
  34. Association ConnectingLine(Symbol, Symbol) {
  35. name = "ConnectingLine"
  36. }
  37. Association SymbolTextLabel(Symbol, TextLabel) {
  38. name = "SymbolTextLabel"
  39. }