A type is defined by specifying its class, union or enum in ODL.
The characteristics of the type itself appears first, followed by
lists that defined attributes, relationships and operations of its
class.
type_spec : type_qualifier class_spec { [class_body] ; } ;
type_spec : enum <identifier>[alias_name] { enum_body [,] }
type_qualifier : classA type_spec is denoted by a type_qualifier which must be one of the following tokens:
| struct
| union
| interface
| superclass
| superstruct
class_spec : <identifier>[class_impl] [alias_name] [extends <identifier>]
alias_name : [ <identifier>]
class_impl : ( implementation < index_spec >)
class Person {
[class_body]
};
class Employee extends Person {
[class_body]
};
class Employee : Person {
[class_body]
};
class Slave [pp_Slave] extends Employee {
[class_body]
};
class Slave [slave_class] [~ 100K] extends Employee {
[class_body]
};
enum CivilState {
[enum_body]
};
enum CivilState [civil_state] {
[enum_body]
};