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
3ce04355
Commit
3ce04355
authored
Apr 28, 2019
by
Maxime Perrotin
Browse files
Add optional generation of files per block
parent
45727ac9
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/taste-concurrency_view.adb
View file @
3ce04355
...
...
@@ -264,6 +264,20 @@ package body TASTE.Concurrency_View is
Block_Assoc
:
Translate_Set
:=
Tmpl
.
Header
;
PI_Tag
:
Unbounded_String
;
RI_Tag
:
Unbounded_String
;
Result
:
Unbounded_String
;
-- Optionally generate block code in separate files
-- (if fileblock.tmplt present and contains a filename)
Block_File_Id
:
constant
String
:=
Path
&
"/fileblock.tmplt"
;
Block_Check
:
constant
Boolean
:=
Exists
(
Block_File_Id
);
Block_Tag
:
constant
Translate_Set
:=
+
Assoc
(
"Block_Name"
,
B
.
Name
);
Block_File_Name
:
constant
String
:=
(
if
Block_Check
then
Strip_String
(
Parse
(
Block_File_Id
,
Block_Tag
))
else
""
);
begin
for
PI_Assoc
of
Tmpl
.
Provided
loop
PI_Tag
:=
PI_Tag
&
Newline
...
...
@@ -277,8 +291,21 @@ package body TASTE.Concurrency_View is
&
Assoc
(
"Provided"
,
PI_Tag
)
&
Assoc
(
"Required"
,
RI_Tag
);
Blocks
:=
Blocks
&
Newline
&
String
'(
Parse
(
Path
&
"/block.tmplt"
,
Block_Assoc
));
Result
:=
Parse
(
Path
&
"/block.tmplt"
,
Block_Assoc
);
Blocks
:=
Blocks
&
Newline
&
To_String
(
Result
);
-- Save the content of the block in a file
-- (if required at template folder level)
if
Block_File_Name
/=
""
then
Create_Path
(
CV_Out_Dir
&
Node_Name
);
Create
(
File
=>
Output_File
,
Mode
=>
Out_File
,
Name
=>
CV_Out_Dir
&
Node_Name
&
"/"
&
Block_File_Name
);
Put_Line
(
Output_File
,
To_String
(
Result
));
Close
(
Output_File
);
end
if
;
end
;
end
loop
;
-- Association includes Name, Coverage, CPU Info, etc.
...
...
templates/concurrency_view/aadl_1_nodes/fileblock.tmplt
0 → 100644
View file @
3ce04355
@@-- Specify the file name for a protected block
@@-- @_Block_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
templates/concurrency_view/aadl_2_threads/fileblock.tmplt
0 → 100644
View file @
3ce04355
@@-- Specify the file name for a protected block
@@-- @_Block_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
templates/concurrency_view/aadl_3_main/fileblock.tmplt
0 → 100644
View file @
3ce04355
@@-- Specify the file name for a protected block
@@-- @_Block_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
templates/concurrency_view/aadl_3_main/filepart.tmplt
0 → 100644
View file @
3ce04355
@@-- Specify the file name for a partition
@@-- @_Partition_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
templates/concurrency_view/aadl_3_main/filethread.tmplt
0 → 100644
View file @
3ce04355
@@-- Specify the file name for a thread
@@-- @_Thread_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
templates/concurrency_view/ada_basic_body/fileblock.tmplt
0 → 100644
View file @
3ce04355
@@-- Specify the file name for a protected block
@@-- @_Block_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
templates/concurrency_view/ada_basic_source/fileblock.tmplt
0 → 100644
View file @
3ce04355
@@-- Specify the file name for a protected block
@@-- @_Block_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
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