Contents Index Search Related Documents Previous Next
12.5.5 Formal Interface Types
1/2
The class determined for a formal interface
type is the class of all interface types.
Syntax
2/2
formal_interface_type_definition
::= interface_type_definition
Legality Rules
3/2
The actual type shall be an interface type.
4/2
The actual type shall be a descendant of every
progenitor of the formal type.
5/2
The actual type shall be a limited, task, protected,
or synchronized interface if and only if the formal type is also, respectively,
a limited, task, protected, or synchronized interface.
Examples
6/2
type Root_Work_Item is tagged private;
7/2
generic
type Managed_Task is task interface;
type Work_Item(<>) is new Root_Work_Item with private;
package Server_Manager is
task type Server is new Managed_Task with
entry Start(Data : in out Work_Item);
end Server;
end Server_Manager;
8/2
This generic allows an application to establish
a standard interface that all tasks need to implement so they can be
managed appropriately by an application-specific scheduler.
Contents Index Search Related Documents Previous Next Legal