Commit 8c9334a1 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

In Ada, always generate runTransition

parent 19a7dbf5
...@@ -302,8 +302,7 @@ LD_LIBRARY_PATH=. opengeode-simulator ...@@ -302,8 +302,7 @@ LD_LIBRARY_PATH=. opengeode-simulator
.format(name, UNICODE_SEP), .format(name, UNICODE_SEP),
'\n']) '\n'])
# Add the declaration of the runTransition procedure, if needed # Add the declaration of the runTransition procedure
if process.transitions:
process_level_decl.append('procedure runTransition(Id: Integer);') process_level_decl.append('procedure runTransition(Id: Integer);')
# Generate the code of the start transition (if process not empty) # Generate the code of the start transition (if process not empty)
...@@ -921,6 +920,13 @@ package {process_name} is'''.format(process_name=process_name, ...@@ -921,6 +920,13 @@ package {process_name} is'''.format(process_name=process_name,
taste_template.append('end loop;') taste_template.append('end loop;')
taste_template.append('end runTransition;') taste_template.append('end runTransition;')
taste_template.append('\n') taste_template.append('\n')
else:
# No transitions defined, but keep the interface for CS_Only calls
taste_template.append('procedure runTransition(Id: Integer) is')
taste_template.append('begin')
taste_template.append('null;')
taste_template.append('end runTransition;')
taste_template.append('\n')
# Add code of the package elaboration # Add code of the package elaboration
taste_template.extend(start_transition) taste_template.extend(start_transition)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment