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
OpenGEODE
Commits
99ce1bc9
Commit
99ce1bc9
authored
Oct 21, 2015
by
Maxime Perrotin
Browse files
Improve code generation with aggregations
parent
3ca8bf7f
Changes
1
Show whitespace changes
Inline
Side-by-side
opengeode/AdaGenerator.py
View file @
99ce1bc9
...
...
@@ -468,13 +468,14 @@ package {process_name} is'''.format(process_name=process_name,
# - add a swich case on the corresponding substate
taste_template
.
append
(
u
'-- this is a state aggregation'
)
for
sub
in
aggregates
[
state
]:
for
par
in
sub
.
mapping
.
viewkeys
()
:
if
par
in
mapping
[
signame
].
viewkeys
():
if
[
a
for
a
in
sub
.
mapping
.
viewkeys
()
if
a
in
mapping
[
signame
].
viewkeys
()
]
:
taste_template
.
append
(
u
'case '
u
'{ctxt}.{sub}{sep}state is'
.
format
(
ctxt
=
LPREFIX
,
sub
=
sub
.
statename
,
sep
=
UNICODE_SEP
))
for
par
in
sub
.
mapping
.
viewkeys
():
case_state
(
par
)
taste_template
.
append
(
'when others =>'
)
taste_template
.
append
(
'null;'
)
...
...
Write
Preview
Markdown
is supported
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