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
221cc216
Commit
221cc216
authored
Aug 01, 2016
by
yoogx
Browse files
* Visit_Subcomponents_Of_G: new generic function to visit
subcomponents of a current entity.
parent
a9a5a33a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/backends/ocarina-backends-utils.adb
View file @
221cc216
...
...
@@ -3868,9 +3868,9 @@ package body Ocarina.Backends.Utils is
return
False
;
end
Process_Use_Defaults_Sockets
;
-------------------------
-
--
Get_Associated_Bus
--
-------------------------
-
-------------------------
-- Get_Associated_Bus --
-------------------------
function
Get_Associated_Bus
(
Port
:
Node_Id
)
return
Node_Id
is
C
:
Node_Id
;
...
...
@@ -4048,4 +4048,24 @@ package body Ocarina.Backends.Utils is
return
Core_Id
;
end
Get_Core_Id
;
------------------------------
-- Visit_Subcomponents_Of_G --
------------------------------
procedure
Visit_Subcomponents_Of_G
(
E
:
Node_Id
)
is
package
AINU
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
;
S
:
Node_Id
;
begin
if
not
AINU
.
Is_Empty
(
Subcomponents
(
E
))
then
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
end
Visit_Subcomponents_Of_G
;
end
Ocarina
.
Backends
.
Utils
;
src/backends/ocarina-backends-utils.ads
View file @
221cc216
...
...
@@ -35,6 +35,15 @@ package Ocarina.Backends.Utils is
type
Browsing_Kind
is
(
By_Source
,
By_Destination
,
Default
);
------------------
-- AST visitor --
------------------
generic
with
procedure
Visit
(
E
:
Node_Id
);
procedure
Visit_Subcomponents_Of_G
(
E
:
Node_Id
);
-- Visit the component instance corresponding to the subcomponents of E
--------------------------
-- Directory Operations --
--------------------------
...
...
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