text stringlengths 0 234 |
|---|
Minor_Loop: |
while Temp_Minor_Pointer /= null loop |
if Class = Multiple_Side then |
Root_Object.Object_List.Insert ( |
New_Item => Temp_Minor_Pointer.Multiple, |
On_To => To); |
elsif Class = Associative_Side then |
Root_Object.Object_List.Insert ( |
New_Item => Temp_Minor_Pointer.Associative, |
On_To => To); |
end if; |
Temp_Minor_Pointer := Temp_Minor_Pointer.Next; |
end loop Minor_Loop; |
exit Major_Loop; |
end if; |
Temp_Major_Pointer := Temp_Major_Pointer.Next; |
end loop Major_Loop; |
-- |
end if; |
end Navigate; |
------------------------------------------------------------------------ |
-- associative correlated navigation |
procedure Navigate ( |
From : in Root_Object.Object_Access; |
Also : in Root_Object.Object_Access; |
Class : in Ada.Tags.Tag; |
To : out Root_Object.Object_Access) is |
-- navigate from two singles to a single |
-- valid for: |
-- M and S -> A |
-- S and M -> A |
Temp_Single, |
Single_Side_Source , |
Multiple_Side_Source, |
Temp_Associative_Multiple, |
Temp_Associative_Single : Root_Object.Object_Access := null; |
Assoc_Set : Root_Object.Object_List.List_Header_Access_Type := Root_Object.Object_List.Initialise; |
Found, |
Tags_Correct : Boolean := FALSE; |
begin |
-- Reset the output pointer to null so that if we don't find anything |
-- useful, the caller can check for it. |
To := null; |
Tags_Correct := ((( From.all'Tag = Multiple_Side) and then |
( Also.all'Tag = Single_Side)) |
or else ((( From.all'Tag = Single_Side) and then |
( Also.all'Tag = Multiple_Side)))) ; |
if Tags_Correct then |
if From.all'Tag = Multiple_Side then |
Multiple_Side_Source := From; |
Single_Side_Source := Also; |
else |
Multiple_Side_Source := Also; |
Single_Side_Source := From; |
end if; |
-- Do the navigations now, all is correct. |
-- Navigate from multiple side to associative side. |
Check_List_For_Multiple ( |
Multiple_Instance => Multiple_Side_Source, |
Associative_Instance => Temp_Associative_Multiple, |
Single_Instance => Temp_Single, |
Multiple_Instance_Found => Found); |
-- Navigate from single side to associative side. |
if Found then |
-- do the navigation |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.