text stringlengths 0 234 |
|---|
elsif Source_Instance.all'Tag = Associative_Side then |
Navigate ( |
From => Source_Instance, |
Class => Class, |
To => Temp_Instance); |
if Temp_Instance /= null then |
Root_Object.Object_List.Insert ( |
New_Item => Temp_Instance, |
On_To => To ); |
end if; |
-- |
end if; |
Temp_Node := Root_Object.Object_List.Next_Entry_Of (From); |
end loop; |
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 -> M |
-- A -> S |
-- M -> S |
-- M -> A |
-- |
Temp_Single: Root_Object.Object_Access; |
Temp_Associative: Root_Object.Object_Access; |
Temp_Multiple: Root_Object.Object_Access; |
Found: Boolean; |
begin |
-- PILOT_0000_1422 |
-- Defaulting the return parameter ensures that if an attempt |
-- is made to navigate this type of one to many associative |
-- without having linked it, the correct null parameter is |
-- returned. This relationship mechanism relies on the link |
-- operation to sort out all the tags. We can't rely on that |
-- happening in all cases. |
To := null; |
if From.all'Tag = Multiple_Side then |
-- |
Check_List_For_Multiple ( |
Multiple_Instance => From, |
Associative_Instance => Temp_Associative, |
Single_Instance => Temp_Single, |
Multiple_Instance_Found => Found); |
if Found then |
-- |
if Class = Single_Side then |
To := Temp_Single; |
elsif Class = Associative_Side then |
To := Temp_Associative; |
end if; |
-- |
end if; |
-- |
elsif From.all'Tag = Associative_Side then |
Check_List_For_Associative ( |
Associative_Instance => From, |
Multiple_Instance => Temp_Multiple, |
Single_Instance => Temp_Single, |
Associative_Instance_Found => Found); |
if Found then |
-- |
if Class = Single_Side then |
To := Temp_Single; |
elsif Class = Multiple_Side then |
To := Temp_Multiple; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.