Commit 9718e5b9 authored by hugues.jerome's avatar hugues.jerome
Browse files

* Minor reformatting



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@1321 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent e1357b60
...@@ -148,6 +148,7 @@ package body Ocarina.Instances.Properties is ...@@ -148,6 +148,7 @@ package body Ocarina.Instances.Properties is
Property_Instance : Node_Id; Property_Instance : Node_Id;
Pointed_Instance : Node_Id; Pointed_Instance : Node_Id;
Success : Boolean := True; Success : Boolean := True;
begin begin
-- We first find the instance on which the property applies -- We first find the instance on which the property applies
...@@ -158,7 +159,8 @@ package body Ocarina.Instances.Properties is ...@@ -158,7 +159,8 @@ package body Ocarina.Instances.Properties is
if Present (Pointed_Instance) then if Present (Pointed_Instance) then
if Ocarina.ME_AADL.AADL_Instances.Nodes.Properties if Ocarina.ME_AADL.AADL_Instances.Nodes.Properties
(Pointed_Instance) = No_List then (Pointed_Instance) = No_List
then
AIN.Set_Properties (Pointed_Instance, AIN.Set_Properties (Pointed_Instance,
AINU.New_List (K_List_Id, No_Location)); AINU.New_List (K_List_Id, No_Location));
end if; end if;
...@@ -170,8 +172,8 @@ package body Ocarina.Instances.Properties is ...@@ -170,8 +172,8 @@ package body Ocarina.Instances.Properties is
(AIN.Properties (Pointed_Instance), (AIN.Properties (Pointed_Instance),
Property_Association); Property_Association);
if Present (Property_Instance) and then if Present (Property_Instance)
ATN.Is_Additive_Association (Property_Association) and then ATN.Is_Additive_Association (Property_Association)
then then
-- Append the current value to the old value list -- Append the current value to the old value list
...@@ -182,6 +184,7 @@ package body Ocarina.Instances.Properties is ...@@ -182,6 +184,7 @@ package body Ocarina.Instances.Properties is
ATN.Property_Association_Value (Property_Association), ATN.Property_Association_Value (Property_Association),
Entity_Instance, Entity_Instance,
ATN.Property_Association_Value (Property_Instance))); ATN.Property_Association_Value (Property_Instance)));
else else
Property_Instance := AINU.New_Node Property_Instance := AINU.New_Node
(K_Property_Association_Instance, (K_Property_Association_Instance,
...@@ -244,13 +247,12 @@ package body Ocarina.Instances.Properties is ...@@ -244,13 +247,12 @@ package body Ocarina.Instances.Properties is
if Present (Container_Component) then if Present (Container_Component) then
Instantiate_In_Modes Instantiate_In_Modes
(Container_Component, (Container_Component, Property_Instance);
Property_Instance);
end if; end if;
end; end;
if Present (ATN.Property_Association_Value if Present
(Property_Association)) then (ATN.Property_Association_Value (Property_Association)) then
AIN.Set_Property_Association_Value AIN.Set_Property_Association_Value
(Property_Instance, (Property_Instance,
Duplicate_Property_Value Duplicate_Property_Value
...@@ -273,9 +275,13 @@ package body Ocarina.Instances.Properties is ...@@ -273,9 +275,13 @@ package body Ocarina.Instances.Properties is
-- for subcomponents override the properties that are -- for subcomponents override the properties that are
-- declared for the corresponding components. -- declared for the corresponding components.
-- XXX looks strange: why relying on order ? should
-- _remove_ the property from the list instead
AINU.Push_Node_To_List AINU.Push_Node_To_List
(Property_Instance, (Property_Instance,
AIN.Properties (Pointed_Instance)); AIN.Properties (Pointed_Instance));
else else
AINU.Append_Node_To_List AINU.Append_Node_To_List
(Property_Instance, (Property_Instance,
...@@ -351,6 +357,7 @@ package body Ocarina.Instances.Properties is ...@@ -351,6 +357,7 @@ package body Ocarina.Instances.Properties is
AIN.Property_Association_Value (Property_Association), AIN.Property_Association_Value (Property_Association),
Entity_Instance, Entity_Instance,
AIN.Property_Association_Value (Property_Instance))); AIN.Property_Association_Value (Property_Instance)));
else else
Property_Instance := AINU.New_Node Property_Instance := AINU.New_Node
(K_Property_Association_Instance, (K_Property_Association_Instance,
...@@ -531,6 +538,7 @@ package body Ocarina.Instances.Properties is ...@@ -531,6 +538,7 @@ package body Ocarina.Instances.Properties is
end loop; end loop;
end if; end if;
end if; end if;
else else
-- We first duplicate the values of the former property -- We first duplicate the values of the former property
-- association. -- association.
...@@ -673,7 +681,7 @@ package body Ocarina.Instances.Properties is ...@@ -673,7 +681,7 @@ package body Ocarina.Instances.Properties is
(Property_Value)))); (Property_Value))));
when AADL_V2 => when AADL_V2 =>
-- Node is an Contained_Element_Path -- Node is a Contained_Element_Path
Set_List_Items (Node, Set_List_Items (Node,
New_List (K_List_Id, New_List (K_List_Id,
...@@ -681,6 +689,7 @@ package body Ocarina.Instances.Properties is ...@@ -681,6 +689,7 @@ package body Ocarina.Instances.Properties is
(List_Items (List_Items
(Reference_Term (Reference_Term
(Property_Value)))))); (Property_Value))))));
if List_Items (Reference_Term if List_Items (Reference_Term
(Property_Value)) /= No_List (Property_Value)) /= No_List
then then
...@@ -698,6 +707,7 @@ package body Ocarina.Instances.Properties is ...@@ -698,6 +707,7 @@ package body Ocarina.Instances.Properties is
-- XXX TODO INSTANCIATE ANNEX_PATH NODE -- XXX TODO INSTANCIATE ANNEX_PATH NODE
end case; end case;
Set_Reference_Term (Instantiated_Value, Node); Set_Reference_Term (Instantiated_Value, Node);
when K_Minus_Numeric_Term => when K_Minus_Numeric_Term =>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment