| 1 |
with Ada.Finalization; |
| 2 |
package task_name is |
| 3 |
type Base_Controller is |
| 4 |
abstract new Ada.Finalization.Limited_Controlled with null record; |
| 5 |
|
| 6 |
type Extended_Controller is |
| 7 |
abstract new Base_Controller with private; |
| 8 |
|
| 9 |
type Task_Object (Controller : access Extended_Controller'Class) is |
| 10 |
limited private; |
| 11 |
private |
| 12 |
type String_Access is access string; |
| 13 |
|
| 14 |
type Extended_Controller is |
| 15 |
abstract new Base_Controller with record |
| 16 |
Thread : aliased Task_Object (Extended_Controller'Access); |
| 17 |
Name : String_Access := new string'("the_name_of_the_task"); |
| 18 |
end record; |
| 19 |
|
| 20 |
task type Task_Object (Controller : access Extended_Controller'Class) is pragma Task_Name (Controller.Name.all); |
| 21 |
end Task_Object; |
| 22 |
end; |