Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
82478100
Commit
82478100
authored
Nov 14, 2015
by
Maxime Perrotin
Browse files
Add getter function for aggregate states in dll
parent
69f25064
Changes
1
Hide whitespace changes
Inline
Side-by-side
opengeode/AdaGenerator.py
View file @
82478100
...
...
@@ -334,6 +334,17 @@ package {process_name} is'''.format(process_name=process_name,
dll_api
.
append
(
"end set_state;"
)
dll_api
.
append
(
""
)
# interface to get/set state aggregations XXX add to C generator
for
substates
in
aggregates
.
viewvalues
():
for
each
in
substates
:
process_level_decl
.
append
(
u
"function get_{name}_state return chars_ptr "
u
"is (New_String(states'Image({ctxt}.{name}{sep}state)"
")) with Export, Convention => C, "
'Link_Name => "{proc}_{name}_state";'
.
format
(
name
=
each
.
statename
,
ctxt
=
LPREFIX
,
proc
=
process_name
,
sep
=
UNICODE_SEP
))
# Functions to get gobal variables (length and value)
for
var_name
,
(
var_type
,
_
)
in
process
.
variables
.
viewitems
():
# Getters for local variables
...
...
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