Commit 5fb8c5c2 authored by yoogx's avatar yoogx

* Added Image mechanisms for LT_Element

parent 988680f6
......@@ -6,7 +6,7 @@
-- --
-- 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 --
-- it under terms of the GNU General Public License as published by the --
......@@ -31,20 +31,22 @@
-- --
------------------------------------------------------------------------------
with Namet;
with GNAT.Table;
with Charset;
with Locations;
with Namet;
with Ada.Characters.Handling;
with Ada.Numerics.Generic_Elementary_Functions;
with Ada.Long_Long_Float_Text_IO;
with Charset;
with GNAT.Table;
with Ocarina.AADL_Values;
with Ocarina.ME_REAL.REAL_Tree.Nutils;
with Ocarina.ME_AADL.AADL_Instances.Nutils;
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_False : constant String := "false";
......@@ -193,8 +195,17 @@ package body Ocarina.REAL_Values is
(Image (Value.RVal_Right, Value.RVBase, Value.RVExp));
when LT_Element =>
-- FIXME
raise Program_Error;
declare
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;
......@@ -205,8 +216,7 @@ package body Ocarina.REAL_Values is
-- Image --
-----------
function Image (Value : Value_Id; Quoted : Boolean := True) return String
is
function Image (Value : Value_Id; Quoted : Boolean := True) return String is
begin
if Value = No_Value then
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