text
stringlengths
0
234
-- return from this procedure.
Matched := Temp_Associative_One = Temp_Associative_Two;
if not Matched then
Inner_Temp_Entry := Root_Object.Object_List.Next_Entry_Of(Assoc_Set_Two);
end if;
end loop; -- end of (Temp_Entry /= null) or else Matched loop
Function Definition: procedure Remove_Pair is new Ada.Unchecked_Deallocation (
Function Body: Relationship_Pair_Type, Relationship_Pair_Access_Type);
--
-- 'Major' element
--
type Relationship_Entry_Type;
type Relationship_Entry_Access_Type is access all Relationship_Entry_Type;
type Relationship_Entry_Type is record
Single : Root_Object.Object_Access;
Completion_List : Relationship_Pair_Access_Type;
Next : Relationship_Entry_Access_Type;
Previous : Relationship_Entry_Access_Type;
end record;
procedure Remove_Entry is new Ada.Unchecked_Deallocation (
Relationship_Entry_Type, Relationship_Entry_Access_Type);
------------------------------------------------------------------------
The_Relationship_List: Relationship_Entry_Access_Type;
subtype Role_Phrase_Type is string (1 .. Application_Types.Maximum_Number_Of_Characters_In_String);
Multiple_Side : Ada.Tags.Tag;
Multiple_Side_Role : Role_Phrase_Type;
Multiple_Side_Role_Length : Natural;
Single_Side : Ada.Tags.Tag;
Single_Side_Role : Role_Phrase_Type;
Single_Side_Role_Length : Natural;
Associative_Side : Ada.Tags.Tag;
Associative_Side_Role : Role_Phrase_Type;
Associative_Side_Role_Length : Natural;
--
-- A = LEFT = MULTIPLE
-- B = RIGHT = SINGLE
--
------------------------------------------------------------------------
procedure Check_List_For_Multiple (
Multiple_Instance : in Root_Object.Object_Access;
Associative_Instance : out Root_Object.Object_Access;
Single_Instance : out Root_Object.Object_Access;
Multiple_Instance_Found : out Boolean) is
Temp_Minor_Pointer : Relationship_Pair_Access_Type;
Temp_Major_Pointer : Relationship_Entry_Access_Type;
begin
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;