lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.generator.python.PythonParameterGenerator Class Reference

Generate Python code for parameters. More...

Static Public Member Functions

static String generatePythonGetters (ReactorDecl decl)
 Generate Python code getters for parameters of reactor 'decl'.
static String generatePythonInitializer (ParameterInstance p)
 Return a Python expression that can be used to initialize the specified parameter instance.
static String generatePythonInstantiations (ReactorDecl decl, PythonTypes types)
 Generate Python code that instantiates and initializes parameters for a reactor 'decl'.

Detailed Description

Generate Python code for parameters.

Member Function Documentation

◆ generatePythonGetters()

String org.lflang.generator.python.PythonParameterGenerator.generatePythonGetters ( ReactorDecl decl)
static

Generate Python code getters for parameters of reactor 'decl'.

Parameters
declThe reactor declaration
Returns
The generated code as a StringBuilder

◆ generatePythonInitializer()

String org.lflang.generator.python.PythonParameterGenerator.generatePythonInitializer ( ParameterInstance p)
static

Return a Python expression that can be used to initialize the specified parameter instance.

If the parameter initializer refers to other parameters, then those parameter references are replaced with accesses to the Python reactor instance class of the parents of those parameters.

Parameters
pThe parameter instance to create initializer for
Returns
Initialization code

◆ generatePythonInstantiations()

String org.lflang.generator.python.PythonParameterGenerator.generatePythonInstantiations ( ReactorDecl decl,
PythonTypes types )
static

Generate Python code that instantiates and initializes parameters for a reactor 'decl'.

Parameters
declThe reactor declaration
typesThe Python type helper.
Returns
The generated code as a StringBuilder

The documentation for this class was generated from the following file:
  • /Users/runner/work/lingua-franca/lingua-franca/core/src/main/java/org/lflang/generator/python/PythonParameterGenerator.java