text stringlengths 0 234 |
|---|
-- 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; |
end if; |
end if; |
end if; |
end Navigate; |
--------------------------------------------------------------------- |
procedure Navigate ( |
From : in Root_Object.Object_Access; |
Class : in Ada.Tags.Tag; |
To : in Root_Object.Object_List.List_Header_Access_Type) is |
-- |
-- navigate from a single to a set |
-- valid for: |
-- S -> M |
-- S -> A |
-- |
Temp_Minor_Pointer: Relationship_Pair_Access_Type; |
Temp_Major_Pointer: Relationship_Entry_Access_Type; |
begin |
if From.all'Tag = Single_Side then |
Temp_Major_Pointer := The_Relationship_List; |
Major_Loop: |
while Temp_Major_Pointer /= null loop |
if Temp_Major_Pointer.Single = From then |
Temp_Minor_Pointer := Temp_Major_Pointer.Completion_List; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.