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

Generates C code to declare and initialize parameters. More...

Static Public Member Functions

static String generateDeclarations (TypeParameterizedReactor reactor, CTypes types, boolean suppressLineDirectives)
 Generate code for parameters variables of a reactor in the form "parameter.type parameter.name;".
static String getInitializer (ParameterInstance p)
 Return a C expression that can be used to initialize the specified parameter instance.

Detailed Description

Generates C code to declare and initialize parameters.

Author
Edward A. Lee
Soroush Bateni
Hou Seng Wong

Member Function Documentation

◆ generateDeclarations()

String org.lflang.generator.c.CParameterGenerator.generateDeclarations ( TypeParameterizedReactor reactor,
CTypes types,
boolean suppressLineDirectives )
static

Generate code for parameters variables of a reactor in the form "parameter.type parameter.name;".

Parameters
reactorTypeParameterizedReactor
typesA helper class for types
suppressLineDirectivesWhether to suppress the generation of line directives.

◆ getInitializer()

String org.lflang.generator.c.CParameterGenerator.getInitializer ( ParameterInstance p)
static

Return a C 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 self struct of the parents of those parameters.


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/c/CParameterGenerator.java