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
f4efd10f
Commit
f4efd10f
authored
Jun 24, 2015
by
yoogx
Browse files
* Instantiate: return a boolean
For issue #30
parent
15d663e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/python/ocarina-python_cmd.adb
View file @
f4efd10f
...
...
@@ -129,8 +129,11 @@ package body Ocarina.Python_Cmd is
Command
:
String
)
is
pragma
Unreferenced
(
Command
);
Result
:
constant
Boolean
:=
Ocarina
.
Utils
.
Instantiate
(
Nth_Arg
(
Data
,
1
,
""
));
begin
Ocarina
.
Utils
.
Instantiate
(
Nth_Arg
(
Data
,
1
,
""
)
);
Set_Return_Value
(
Data
,
Result
);
end
On_Instantiate
;
----------------------
...
...
src/python/ocarina-utils.adb
View file @
f4efd10f
...
...
@@ -222,7 +222,8 @@ package body Ocarina.Utils is
-- Instantiate --
-----------------
procedure
Instantiate
(
Root_System
:
String
)
is
function
Instantiate
(
Root_System
:
String
)
return
Boolean
is
Success
:
Boolean
;
begin
if
Root_System
/=
""
then
Root_System_Name
:=
To_Lower
...
...
@@ -231,7 +232,12 @@ package body Ocarina.Utils is
AADL_Root
:=
Instantiate_Model
(
AADL_Root
);
if
Present
(
AADL_Root
)
then
Write_Line
(
"Model instantiated sucessfully"
);
Success
:=
True
;
else
Success
:=
False
;
end
if
;
return
Success
;
end
Instantiate
;
--------------
...
...
src/python/ocarina-utils.ads
View file @
f4efd10f
...
...
@@ -48,7 +48,7 @@ package Ocarina.Utils is
procedure
Load_AADL_File
(
Filename
:
String
);
function
Analyze
return
Boolean
;
procedure
Instantiate
(
Root_System
:
String
);
function
Instantiate
(
Root_System
:
String
)
return
Boolean
;
procedure
Generate
(
Backend_Name
:
String
);
procedure
Reset
;
...
...
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