|
1. Defining the Object Model
1.1 Specifying a Class
In the simplest case, just the class of object held is needed. Supported classes are:
- Integer
- Float
- String
- Date
- Boolean
- Time
- TimeStamp
Example (for an imaginary class Person)
define: #surname as: String;
define: #dateOfBirth as: Date;
define: #annualSalary as: Float;
define: #isMarried as: Boolean;
define: #numberOfChildren as: Integer;Additionally, any other class defining an addClassDefinitionTo: method may be used. This allows your classes to reference each other or even themselves:
define: #sex as: Gender;
define: #homeAddress as: Address;
define: #workAddress as: Address;
define: #spouse as: Person
1.1 Specifying a Class