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
6c2b66fa
Commit
6c2b66fa
authored
Oct 10, 2015
by
yoogx
Browse files
* (Extract_Value): new helper routines to get value from a
Value_Type
parent
03d57f19
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core/tree/ocarina-aadl_values.ads
View file @
6c2b66fa
...
...
@@ -61,6 +61,21 @@ package Ocarina.AADL_Values is
end
case
;
end
record
;
function
Extract_Value
(
Value
:
Value_Type
)
return
Long_Long
is
(
if
Value
.
ISign
then
-
Long_Long
(
Value
.
IVal
)
else
Long_Long
(
Value
.
IVal
));
function
Extract_Value
(
Value
:
Value_Type
)
return
Unsigned_Long_Long
is
(
if
Value
.
ISign
then
raise
Constraint_Error
else
Value
.
IVal
);
function
Extract_Value
(
Value
:
Value_Type
)
return
Long_Double
is
(
if
Value
.
RSign
then
-
Long_Double
(
Value
.
RVal
)
else
Long_Double
(
Value
.
RVal
));
function
Extract_Value
(
Value
:
Value_Type
)
return
Name_Id
is
(
if
Value
.
T
=
LT_String
then
Value
.
SVal
else
Value
.
EVal
);
function
Extract_Value
(
Value
:
Value_Type
)
return
Boolean
is
(
Value
.
BVal
);
No_Value
:
constant
Value_Id
;
V_Zero
:
Value_Id
;
V_One
:
Value_Id
;
...
...
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