Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
5fb8c5c2
Commit
5fb8c5c2
authored
Nov 14, 2013
by
yoogx
Browse files
* Added Image mechanisms for LT_Element
parent
988680f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core/tree/ocarina-real_values.adb
View file @
5fb8c5c2
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-201
2
ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-201
3
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
(
f
loat
);
package
Num
is
new
Ada
.
Numerics
.
Generic_Elementary_Functions
(
F
loat
);
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"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment