text stringlengths 0 234 |
|---|
P : Classes.Property) return Ada_Pretty.Node_Access; |
function Vector_Args |
(Item : Classes.Class; |
P : Classes.Property) return Ada_Pretty.Node_Access; |
function Get_Inst |
(Item : Classes.Class; |
P : Classes.Property; |
Index : Positive) return Ada_Pretty.Node_Access; |
function Is_Vector (P : Classes.Property) return Boolean is |
(P.Capacity in Classes.Zero_Or_More | Classes.One_Or_More); |
function Get_Name (Index : Natural) return Wide_Wide_String; |
Count : Positive := 1; |
function Get_Name (Index : Natural) return Wide_Wide_String is |
Count_Image : constant Wide_Wide_String := |
Integer'Wide_Wide_Image (Count); |
Index_Image : constant Wide_Wide_String := |
Integer'Wide_Wide_Image (Index); |
Name : constant Wide_Wide_String := |
"F" & Count_Image (2 .. Count_Image'Last); |
begin |
if Index = 0 then |
return Name; |
else |
return Name & "_" & Index_Image (2 .. Index_Image'Last); |
end if; |
end Get_Name; |
---------------- |
-- Child_Args -- |
---------------- |
function Child_Args |
(Item : Classes.Class; |
P : Classes.Property) return Ada_Pretty.Node_Access |
is |
Args : constant Ada_Pretty.Node_Access_Array := |
(F.New_Argument_Association |
(Choice => F.New_Name (+"Element"), |
Value => F.New_Selected_Name |
(Full_Record_Name (Item.Name)) |
), |
F.New_Argument_Association |
(Choice => F.New_Name (+"Child"), |
Value => F.New_Selected_Name |
(Full_Record_Name (P.Type_Name)) |
), |
F.New_Argument_Association |
(Choice => F.New_Name (+"Child_Access"), |
Value => F.New_Selected_Name (Full_Access_Name (P.Type_Name)) |
), |
F.New_Argument_Association |
(Choice => F.New_Name (+"Get_Child"), |
Value => F.New_Selected_Name |
(Get_Package_Name (Item.Name) & "." & P.Name) |
) |
); |
begin |
return F.New_List (Args); |
end Child_Args; |
----------------- |
-- Vector_Args -- |
----------------- |
function Vector_Args |
(Item : Classes.Class; |
P : Classes.Property) return Ada_Pretty.Node_Access |
is |
Args : constant Ada_Pretty.Node_Access_Array := |
(F.New_Argument_Association |
(Choice => F.New_Name (+"Parent"), |
Value => F.New_Selected_Name |
(Full_Record_Name (Item.Name)) |
), |
F.New_Argument_Association |
(Choice => F.New_Name (+"Vector"), |
Value => F.New_Selected_Name |
(Full_Vector_Name (P.Type_Name)) |
), |
F.New_Argument_Association |
(Choice => F.New_Name (+"Vector_Access"), |
Value => F.New_Selected_Name |
(Full_Vector_Name (P.Type_Name) & "_Access") |
), |
F.New_Argument_Association |
(Choice => F.New_Name (+"Get_Vector"), |
Value => F.New_Selected_Name |
(Get_Package_Name (Item.Name) & "." & P.Name) |
) |
); |
begin |
return F.New_List (Args); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.