111
|
1 -- { dg-do run }
|
|
2
|
|
3 with Ada.Containers.Vectors;
|
|
4 with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
|
|
5 procedure array3 is
|
|
6 type Method_Kinds is (Signal, Slot, Method);
|
|
7
|
|
8 package Unbounded_String_Vectors is
|
|
9 new Ada.Containers.Vectors
|
|
10 (Positive, Ada.Strings.Unbounded.Unbounded_String);
|
|
11
|
|
12 Params_Vector : Unbounded_String_Vectors.Vector;
|
|
13
|
|
14 type Method_Info is record
|
|
15 Name : Ada.Strings.Unbounded.Unbounded_String;
|
|
16 Signature : Ada.Strings.Unbounded.Unbounded_String;
|
|
17 Parameters : Unbounded_String_Vectors.Vector;
|
|
18 Kind : Method_Kinds;
|
|
19 end record;
|
|
20
|
|
21 package Method_Info_Vectors is
|
|
22 new Ada.Containers.Vectors (Positive, Method_Info);
|
|
23
|
|
24 Signals : Method_Info_Vectors.Vector;
|
|
25 begin
|
|
26
|
|
27 Unbounded_String_Vectors.Append
|
|
28 (Params_Vector,
|
|
29 Ada.Strings.Unbounded.To_Unbounded_String ("AAA"));
|
|
30
|
|
31 Method_Info_Vectors.Append
|
|
32 (Signals,
|
|
33 (Name => To_Unbounded_String (""),
|
|
34 Signature => To_Unbounded_String (""),
|
|
35 Parameters => Params_Vector,
|
|
36 Kind => Signal));
|
|
37 end;
|