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
57349d3c
Commit
57349d3c
authored
Apr 29, 2015
by
arnaud
Browse files
Add the getRoot function to retrieve the root form the currently instantiated model
parent
38a0e351
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/python/ocarina-python_cmd.adb
View file @
57349d3c
...
...
@@ -134,6 +134,24 @@ package body Ocarina.Python_Cmd is
Ocarina
.
Utils
.
Instantiate
(
Nth_Arg
(
Data
,
1
,
""
));
end
On_Instantiate
;
----------------------
-- On_Get_AADL_Root --
----------------------
procedure
On_Get_AADL_Root
(
Data
:
in
out
Callback_Data
'
Class
;
Command
:
String
);
procedure
On_Get_AADL_Root
(
Data
:
in
out
Callback_Data
'
Class
;
Command
:
String
)
is
pragma
Unreferenced
(
Command
);
begin
Set_Return_Value
(
Data
,
Integer
'
Image
(
Integer
(
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nodes
.
Root_System
(
Ocarina
.
Utils
.
Get_AADL_Root
))));
end
On_Get_AADL_Root
;
----------------
-- On_Analyze --
----------------
...
...
@@ -646,6 +664,11 @@ package body Ocarina.Python_Cmd is
(
Repo
,
"instantiate"
,
1
,
1
,
Handler
=>
On_Instantiate
'
Unrestricted_Access
);
-- getRoot() function
Register_Command
(
Repo
,
"getRoot"
,
0
,
0
,
Handler
=>
On_Get_AADL_Root
'
Unrestricted_Access
);
-- generate() function
Register_Command
(
Repo
,
"generate"
,
1
,
1
,
...
...
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