Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
7849e269
Commit
7849e269
authored
Jun 28, 2019
by
Maxime Perrotin
Browse files
Add connections to the interface view in xml
parent
42a71ec9
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/taste-backend-code_generators.adb
View file @
7849e269
...
...
@@ -528,6 +528,14 @@ package body TASTE.Backend.Code_Generators is
Result
.
Funcs
.
Insert
(
Key
=>
To_String
(
Each
.
Name
),
New_Item
=>
Func_Template
(
Each
));
end
loop
;
for
Each
of
IV
.
Connections
loop
for
C
of
Each
loop
Result
.
Callers
:=
Result
.
Callers
&
C
.
Caller
;
Result
.
Callees
:=
Result
.
Callees
&
C
.
Callee
;
Result
.
RI_Names
:=
Result
.
RI_Names
&
C
.
RI_Name
;
Result
.
PI_Names
:=
Result
.
PI_Names
&
C
.
PI_Name
;
end
loop
;
end
loop
;
return
Result
;
end
Interface_View_Template
;
end
TASTE
.
Backend
.
Code_Generators
;
src/taste-backend-code_generators.ads
View file @
7849e269
...
...
@@ -27,6 +27,8 @@ package TASTE.Backend.Code_Generators is
type
IV_As_Template
is
record
Funcs
:
Func_Maps
.
Map
;
-- Connections:
Callers
,
Callees
,
PI_Names
,
RI_Names
:
Vector_Tag
;
end
record
;
-- Set of functions translating the AST into Templates_Parser mappings
...
...
src/taste-dump.adb
View file @
7849e269
...
...
@@ -119,7 +119,6 @@ package body TASTE.Dump is
end
loop
;
return
Result
;
end
Process_Interfaces
;
begin
if
not
Check
or
not
Trigger
then
Put_Info
(
"Nothing generated from "
&
Path
);
...
...
@@ -140,9 +139,18 @@ package body TASTE.Dump is
end
;
end
loop
;
end
if
;
IV_Tags
:=
+
Assoc
(
"Functions"
,
Functions
);
-- Interface view is made of functions and connections
IV_Tags
:=
+
Assoc
(
"Functions"
,
Functions
)
&
Assoc
(
"Callers"
,
IV
.
Callers
)
&
Assoc
(
"Callees"
,
IV
.
Callees
)
&
Assoc
(
"Caller_RIs"
,
IV
.
RI_Names
)
&
Assoc
(
"Callee_PIs"
,
IV
.
PI_Names
);
-- Output is made of interface, deployment and data views
Output_Tags
:=
+
Assoc
(
"Interface_View"
,
String
'(
Parse
(
IV_Template
,
IV_Tags
)));
Create_Path
(
Output_Prefix
&
"/"
&
Output_Path
);
Create
(
File
=>
Output_File
,
Mode
=>
Out_File
,
...
...
src/taste-interface_view.adb
View file @
7849e269
...
...
@@ -741,7 +741,8 @@ package body TASTE.Interface_View is
end
loop
;
return
IV_AST
:
constant
Complete_Interface_View
:=
(
Flat_Functions
=>
Functions
);
(
Flat_Functions
=>
Functions
,
Connections
=>
Routes_Map
);
end
Parse_Interface_View
;
procedure
Rename_Function
(
IV
:
in
out
Complete_Interface_View
;
...
...
src/taste-interface_view.ads
View file @
7849e269
...
...
@@ -176,6 +176,7 @@ package TASTE.Interface_View is
type
Complete_Interface_View
is
tagged
record
Flat_Functions
:
Function_Maps
.
Map
;
Connections
:
Connection_Maps
.
Map
;
end
record
;
-- Function to build up the Ada AST by transforming the one from Ocarina
...
...
templates/dump/interface_view_xml/interfaceview.tmplt
View file @
7849e269
@@-- @_Functions_@ : functions generated from functions.tmplt
@@-- @_Callers_@ : connection vector tag: caller function names
@@-- @_Callees_@ : |_ corresponding callee function names
@@-- @_Caller_RIs_@ : |_ corresponding name of RIs
@@-- @_Callee_PIs_@ : |_ corresponding name of PIs
<InterfaceView>
@_Functions'Indent_@
@@TABLE@@
<Connection from="@_Callers_@" ri_name="@_Caller_RIs_@" to="@_Callees_@" pi_name="@_Callee_PIs_@"/>
@@END_TABLE@@
</InterfaceView>
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