text stringlengths 0 234 |
|---|
Multiple_Instance_Found := False; |
Temp_Major_Pointer := The_Relationship_List; |
Major_Loop: |
while (not Multiple_Instance_Found) and then Temp_Major_Pointer /= null loop |
Temp_Minor_Pointer := Temp_Major_Pointer.Completion_List; |
Minor_Loop: |
while (not Multiple_Instance_Found) and then Temp_Minor_Pointer /= null loop |
Multiple_Instance_Found := (Temp_Minor_Pointer.Multiple = Multiple_Instance); |
if Multiple_Instance_Found then |
Associative_Instance := Temp_Minor_Pointer.Associative; |
Single_Instance := Temp_Major_Pointer.Single; |
else |
-- Prevent access if we have got what we are after |
-- Bailing out of the search loop is a neater solution, but test team defects |
-- have been raised against this sort of thing. |
Temp_Minor_Pointer := Temp_Minor_Pointer.Next; |
end if; |
end loop Minor_Loop; |
-- Prevent the possibility that the next entry in the major queue is null causing an access error |
if not Multiple_Instance_Found then |
Temp_Major_Pointer := Temp_Major_Pointer.Next; |
end if; |
end loop Major_Loop; |
end Check_List_For_Multiple; |
------------------------------------------------------------------------ |
procedure Check_List_For_Associative ( |
Associative_Instance : in Root_Object.Object_Access; |
Multiple_Instance : out Root_Object.Object_Access; |
Single_Instance : out Root_Object.Object_Access; |
Associative_Instance_Found : out Boolean) is |
Temp_Minor_Pointer : Relationship_Pair_Access_Type; |
Temp_Major_Pointer : Relationship_Entry_Access_Type; |
begin |
Associative_Instance_Found := False; |
Temp_Major_Pointer := The_Relationship_List; |
Major_Loop: |
while (not Associative_Instance_Found) and then Temp_Major_Pointer /= null loop |
Temp_Minor_Pointer := Temp_Major_Pointer.Completion_List; |
Minor_Loop: |
while (not Associative_Instance_Found) and then Temp_Minor_Pointer /= null loop |
Associative_Instance_Found := (Temp_Minor_Pointer.Associative = Associative_Instance); |
if Associative_Instance_Found then |
Multiple_Instance := Temp_Minor_Pointer.Multiple; |
Single_Instance := Temp_Major_Pointer.Single; |
else |
-- Prevent access if we have got what we are after |
-- Bailing out of the search loop is a neater solution, but test team defects |
-- have been raised against this sort of thing. |
Temp_Minor_Pointer := Temp_Minor_Pointer.Next; |
end if; |
end loop Minor_Loop; |
-- Prevent the possibility that the next entry in the major queue is null causing an access error |
if not Associative_Instance_Found then |
Temp_Major_Pointer := Temp_Major_Pointer.Next; |
end if; |
end loop Major_Loop; |
end Check_List_For_Associative; |
----------------------------------------------------------------------- |
procedure Do_Link ( |
Multiple_Instance : in Root_Object.Object_Access; |
Single_Instance : in Root_Object.Object_Access; |
Associative_Instance : in Root_Object.Object_Access) is |
Temp_Minor_Pointer : Relationship_Pair_Access_Type; |
Temp_Major_Pointer : Relationship_Entry_Access_Type; |
Found : Boolean := False; |
begin |
Temp_Major_Pointer := The_Relationship_List; |
while (not Found) and then Temp_Major_Pointer /= null loop |
Found := (Temp_Major_Pointer.Single = Single_Instance); |
if not Found then -- grab the next item |
Temp_Major_Pointer := Temp_Major_Pointer.Next; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.