text
stringlengths
0
234
elsif Class = M1_Side then
M2_Single_M1_Multiple.Navigate (
From => From,
Class => Class,
To => To);
end if;
end if;
end Navigate;
---------------------------------------------------------------------
procedure Navigate (
From : in Root_Object.Object_Access;
Class : in Ada.Tags.Tag;
To : out Root_Object.Object_Access) is
--
-- navigate from a single to a single
-- valid for:
-- A -> M1
-- A -> M2
--
begin
if From.all'tag = Associative_Side then
if Class = M2_Side then
M1_Single_M2_Multiple.Navigate (
From => From,
Class => Class,
To => To);
elsif Class = M1_Side then
M2_Single_M1_Multiple.Navigate (
From => From,
Class => Class,
To => To);
end if;
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:
-- M1 and M2 -> A
-- M1 and M2 -> A
Temp_Associative_One, Temp_Associative_Two : Root_Object.Object_Access := null;
Assoc_Set_One : Root_Object.Object_List.List_Header_Access_Type := Root_Object.Object_List.Initialise;
Assoc_Set_Two : Root_Object.Object_List.List_Header_Access_Type := Root_Object.Object_List.Initialise;
Matched, Inner_Matched : 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;
if ((( From.all'tag = M1_Side) and then
( Also.all'Tag = M2_Side))
or else (( From.all'tag = M2_Side) and then
( Also.all'Tag = M1_Side)))
then
-- Navigate from single instance of first object
-- returns a set.
Navigate (
From => Also,
Class => Class,
To => Assoc_Set_One);
-- Navigate from single instance of second object
-- returns a set.
Navigate (
From => From,
Class => Class,
To => Assoc_Set_Two);