Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
831f29d0
Commit
831f29d0
authored
Jan 27, 2018
by
Maxime Perrotin
Browse files
Add list of ASN.1 modules to Skeleton templates
parent
c16c79e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/taste-backend-skeletons.adb
View file @
831f29d0
...
...
@@ -71,6 +71,19 @@ package body TASTE.Backend.Skeletons is
end
loop
;
return
Interfaces_Tag
;
end
Process_Interfaces
;
-- Return a Tag list of ASN.1 Modules for the skeleton headers
function
Get_Module_List
return
Tag
is
Result
:
Tag
;
begin
for
Each
of
Model
.
Data_View
.
ASN1_Files
loop
for
Module
of
Each
.
Modules
loop
Result
:=
Result
&
Module
.
Name
;
end
loop
;
end
loop
;
return
Result
;
end
Get_Module_List
;
begin
Put_Info
(
"=== Generate skeletons ==="
);
for
Each
of
Model
.
Interface_View
.
Flat_Functions
loop
...
...
@@ -85,10 +98,11 @@ package body TASTE.Backend.Skeletons is
Func_Hdr
:
constant
Translate_Set
:=
(
if
Proceed
then
Func_Tmpl
.
Header
&
Assoc
(
"Provided_Interfaces"
,
Process_Interfaces
(
Func_Tmpl
.
Provided
,
Path
,
Header
))
&
Assoc
(
"Required_Interfaces"
,
Process_Interfaces
(
Func_Tmpl
.
Required
,
Path
,
Header
))
&
Assoc
(
"Provided_Interfaces"
,
Process_Interfaces
(
Func_Tmpl
.
Provided
,
Path
,
Header
))
&
Assoc
(
"Required_Interfaces"
,
Process_Interfaces
(
Func_Tmpl
.
Required
,
Path
,
Header
))
&
Assoc
(
"ASN1_Modules"
,
Get_Module_List
)
else
Null_Set
);
Header_Text
:
constant
String
:=
...
...
templates/skeletons/ada/header.tmplt
View file @
831f29d0
...
...
@@ -43,7 +43,7 @@ package @_CAPITALIZE:Name_@ is
@@
TABLE
@@
--
FUNCTIONS
TO
HANDLE
TIMER
@
_Timers_
@
----------------------------------
procedure
@
_CAPITALIZE
:
Timers_
@
()
;
procedure
@
_CAPITALIZE
:
Timers_
@;
procedure
Set_
@
_CAPITALIZE
:
Timers_
@
(
Value
:
access
asn1SccT_UInt32
);
procedure
Reset_
@
_CAPITALIZE
:
Timers_
@;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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