next up previous contents
Next: Class Body Specification Up: The Object Definition Language Previous: The Top Level ODL   Contents

Subsections


Type Specification

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 [,] }


The Type Qualifier


type_qualifier 		 : class

| struct
| union
| interface
| superclass
| superstruct
A type_spec is denoted by a type_qualifier which must be one of the following tokens:
- class (equivalent to interface and struct)
- union (not implemented in version 2.7.3)
- superclass (equivalent to superstruct)


The Class Specification


class_spec 		 : <identifier>[class_impl] [alias_name] [extends <identifier>]


The Alias Name


alias_name 		 : [ <identifier>]


The Class Implementation


class_impl 		 : ( implementation < index_spec >)


Examples


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]
};


next up previous contents
Next: Class Body Specification Up: The Object Definition Language Previous: The Top Level ODL   Contents
EyeDB manual