Versione finale relazione
[toni-reis.git] / src / simulator-controller.ads
blob1e8b281bb4346fb4520366e2b12160a3a13501c8
1 with Simulator;
3 package Simulator.Controller is
4 pragma Remote_Call_Interface;
6 type Pool_Access is access all Simulator.Pool_Type'Class;
7 type Race_Access is access all Simulator.Remote_Race'Class;
8 type Monitor_Access is access all Simulator.Monitor_Pool_Type'Class;
10 type RaceId_T is new Positive range 1 .. 1;
12 -- a remote access-to-class-wide type used to construct
13 --+ dynamically-bound dispatching calls (which are all those
14 --+ that have a controlling parameter of a type in the derivation
15 --+ hierarchy of this type)
16 pragma Asynchronous (Pool_Access);
17 pragma Asynchronous (Race_Access);
18 --+ when we apply pragma Asynchronous to Pool_Access
19 --+ all subprograms that dispatch on Pool_Type'Class and have only
20 --+ 'in'-mode parameters become asynchronous RPC
22 -- a dynamically-bound dispatching subprogram
23 function RegisterCar
24 (Pool : Pool_Access;
25 CarId : CarId_T)
26 return Boolean;
28 function GetCar
29 (CarId : CarId_T)
30 return Pool_Access;
32 function RegisterRace
33 (Race : Race_Access)
34 return Boolean;
36 function GetRace
37 return Race_Access;
39 function SetStop(i: Boolean) return Boolean;
41 -- Funzioni di registrazione Monitor
42 function RegisterMonitor
43 (Monitor : Monitor_Access)
44 return Boolean;
46 function UnregisterMonitor
47 (Monitor : Monitor_Access)
48 return Boolean;
50 function GetMonitors
51 return Natural;
53 function GetMonitor (MonitorId : Positive)
54 return Monitor_Access;
56 end Simulator.Controller;