text
stringlengths
0
234
pool_Last : AdaM.Id := null_Id;
stored_record_Version : Positive;
function storage_record_Version return Positive
is
begin
return stored_record_Version;
end storage_record_Version;
package view_Vectors is new ada.Containers.Vectors (Positive, View);
freed_Views : view_Vectors.Vector;
-- 'View' to 'Id' Resolution.
--
function to_View (Id : in AdaM.Id) return View
is
begin
return Pool (Id)'Access;
end to_View;
function to_View (Id : in AdaM.Id) return Any_view
is
begin
if Id not in item_Id
then
raise Constraint_Error with "AdaM.Factory ~ Bad pool Id (" & item_Id'Image (Id) & ") for pool " & pool_Name;
end if;
declare
the_View : constant View := Pool (Id)'Access;
begin
return Any_view (the_View);
Function Definition: procedure standard_package_is (Self : in out Item; Now : in AdaM.a_Package.view)
Function Body: is
begin
Self.standard_Package := Now;
end standard_package_is;
function standard_Package (Self : in Item) return AdaM.a_Package.view
is
begin
return Self.standard_Package;
end standard_Package;
function all_Types (Self : in Item) return AdaM.a_Type.Vector
is
the_Types : AdaM.a_Type.Vector;
the_Unit : AdaM.compilation_Unit.view;
pragma Unreferenced (the_Unit);
-- the_Entity : AdaM.Source.Entity_View;
use type AdaM.a_Type.view;
begin
for i in 1 .. Self.Length
loop
the_Unit := Self.Units.Element (i);
-- for j in 1 .. the_Unit.Length
-- loop
-- the_Entity := the_Unit.Entity (j);
--
-- if the_Entity.all in AdaM.a_Type.item'Class
-- then
-- the_Types.append (AdaM.a_Type.view (the_Entity));
-- end if;
-- end loop;
end loop;
return the_Types;
end all_Types;
-- -- TODO: Move these to AdaM.Assist.
--
-- function parent_Name (Identifier : in String) return String
-- is
-- use Ada.Strings,
-- Ada.Strings.fixed;
-- I : constant Natural := Index (Identifier, ".", going => Backward);
-- begin
-- if I = 0
-- then
-- return "Standard";
-- end if;
--