123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- include "primitives.alh"
- SimpleAttribute String {
- constraint = $
- String function constraint(value : Element):
- if (is_physical_string(value)):
- return "OK"!
- else:
- return "String has a non-string value"!
- $
- }
- SimpleAttribute Integer {
- constraint = $
- String function constraint(value : Element):
- if (is_physical_int(value)):
- return "OK"!
- else:
- return "Integer has a non-integer value"!
- $
- }
- SimpleAttribute Boolean {
- constraint = $
- String function constraint(value : Element):
- if (is_physical_boolean(value)):
- return "OK"!
- else:
- return "Boolean has a non-boolean value"!
- $
- }
- Class Icon {
- name = "Icon"
- typeID : String
- is_primitive : Boolean
- }
- Class Image {
- name = "Image"
- data : String
- }
- Class Primitive {
- name = "Primitive"
- }
- Class Rectangle : Primitive {
- name = "Rectangle"
- x : Integer
- y : Integer
- width : Integer
- height : Integer
- }
- Class Ellipse : Primitive {
- name = "Ellipse"
- x : Integer
- y : Integer
- width : Integer
- height : Integer
- }
- Class Line : Primitive {
- name = "Line"
- start_x : Integer
- start_y : Integer
- end_x : Integer
- end_y : Integer
- }
|