Commit 5fb8c5c2 authored by yoogx's avatar yoogx
Browse files

* Added Image mechanisms for LT_Element

parent 988680f6
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2012 ESA & ISAE. -- -- Copyright (C) 2009 Telecom ParisTech, 2010-2013 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify -- -- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the -- -- it under terms of the GNU General Public License as published by the --
...@@ -31,20 +31,22 @@ ...@@ -31,20 +31,22 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
with Namet; with Charset;
with GNAT.Table;
with Locations; with Locations;
with Namet;
with Ada.Characters.Handling; with Ada.Characters.Handling;
with Ada.Numerics.Generic_Elementary_Functions; with Ada.Numerics.Generic_Elementary_Functions;
with Ada.Long_Long_Float_Text_IO; with Ada.Long_Long_Float_Text_IO;
with Charset; with GNAT.Table;
with Ocarina.AADL_Values; with Ocarina.AADL_Values;
with Ocarina.ME_REAL.REAL_Tree.Nutils; with Ocarina.ME_REAL.REAL_Tree.Nutils;
with Ocarina.ME_AADL.AADL_Instances.Nutils;
package body Ocarina.REAL_Values is package body Ocarina.REAL_Values is
package Num is new Ada.Numerics.Generic_Elementary_Functions (float); package Num is new Ada.Numerics.Generic_Elementary_Functions (Float);
AADL_True : constant String := "true"; AADL_True : constant String := "true";
AADL_False : constant String := "false"; AADL_False : constant String := "false";
...@@ -193,8 +195,17 @@ package body Ocarina.REAL_Values is ...@@ -193,8 +195,17 @@ package body Ocarina.REAL_Values is
(Image (Value.RVal_Right, Value.RVBase, Value.RVExp)); (Image (Value.RVal_Right, Value.RVBase, Value.RVExp));
when LT_Element => when LT_Element =>
-- FIXME declare
raise Program_Error; N : Name_Id;
use Ocarina.ME_AADL.AADL_Instances.Nutils;
pragma Warnings (Off, N);
-- XXX We use Compute_Full_Name_Of_Instance, which has a
-- side effect on Name_Buffer
begin
N := Compute_Full_Name_Of_Instance (Value.ELVal, True, True);
exception
when others => null;
end;
end case; end case;
...@@ -205,8 +216,7 @@ package body Ocarina.REAL_Values is ...@@ -205,8 +216,7 @@ package body Ocarina.REAL_Values is
-- Image -- -- Image --
----------- -----------
function Image (Value : Value_Id; Quoted : Boolean := True) return String function Image (Value : Value_Id; Quoted : Boolean := True) return String is
is
begin begin
if Value = No_Value then if Value = No_Value then
return "NoValue"; return "NoValue";
......
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