lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.diagram.synthesis.util.UtilityExtensions Class Reference

Extension class that provides various utility methods for the synthesis. More...

Inherits org.lflang.diagram.synthesis.AbstractSynthesisExtensions.

Public Member Functions

boolean getBooleanValue (SynthesisOption option)
float getFloatValue (SynthesisOption option)
Object getObjectValue (final SynthesisOption option)
ElkMargin getPortMarginsInitIfAbsent (KNode node)
 Returns the port placement margins for the node.
boolean hasContent (final ReactorInstance reactor)
 Returns true if the instance is a bank of reactors.
boolean isMainOrFederated (Reactor reactor)
 Returns true if the reactor is the primary reactor.
boolean isRoot (final ReactorInstance ri)
boolean setID (KGraphElement kge, String id)
 Sets KGE ID.
Object sourceElement (KGraphElement elem)
 Retrieves the source element of the given diagram element.
boolean sourceIsReactor (KNode node)
 Checks if the source element of the given diagram element is a reactor.
String trimCode (final Code tokenizedCode)
 Trims the hostcode of reactions.

Package Functions

public< T extends EObject > T associateWith (T derived, Object source)
public< T extends AbstractDiagramSynthesis<?> > T getRootSynthesis ()

Detailed Description

Extension class that provides various utility methods for the synthesis.

Author
Alexander Schulz-Rosengarten

Member Function Documentation

◆ associateWith()

public< T extends EObject > T org.lflang.diagram.synthesis.AbstractSynthesisExtensions.associateWith ( T derived,
Object source )
packageinherited

◆ getBooleanValue()

boolean org.lflang.diagram.synthesis.AbstractSynthesisExtensions.getBooleanValue ( SynthesisOption option)
inherited

◆ getFloatValue()

float org.lflang.diagram.synthesis.AbstractSynthesisExtensions.getFloatValue ( SynthesisOption option)
inherited

◆ getObjectValue()

Object org.lflang.diagram.synthesis.AbstractSynthesisExtensions.getObjectValue ( final SynthesisOption option)
inherited

◆ getPortMarginsInitIfAbsent()

ElkMargin org.lflang.diagram.synthesis.util.UtilityExtensions.getPortMarginsInitIfAbsent ( KNode node)

Returns the port placement margins for the node.

If this spacing does not yet exist, the properties are initialized.

◆ getRootSynthesis()

public< T extends AbstractDiagramSynthesis<?> > T org.lflang.diagram.synthesis.AbstractSynthesisExtensions.getRootSynthesis ( )
packageinherited

◆ hasContent()

boolean org.lflang.diagram.synthesis.util.UtilityExtensions.hasContent ( final ReactorInstance reactor)

Returns true if the instance is a bank of reactors.

Returns true if the reactor as has inner reactions or instances

◆ isMainOrFederated()

boolean org.lflang.diagram.synthesis.util.UtilityExtensions.isMainOrFederated ( Reactor reactor)

Returns true if the reactor is the primary reactor.

◆ isRoot()

boolean org.lflang.diagram.synthesis.util.UtilityExtensions.isRoot ( final ReactorInstance ri)

◆ setID()

boolean org.lflang.diagram.synthesis.util.UtilityExtensions.setID ( KGraphElement kge,
String id )

Sets KGE ID.

◆ sourceElement()

Object org.lflang.diagram.synthesis.util.UtilityExtensions.sourceElement ( KGraphElement elem)

Retrieves the source element of the given diagram element.

◆ sourceIsReactor()

boolean org.lflang.diagram.synthesis.util.UtilityExtensions.sourceIsReactor ( KNode node)

Checks if the source element of the given diagram element is a reactor.

◆ trimCode()

String org.lflang.diagram.synthesis.util.UtilityExtensions.trimCode ( final Code tokenizedCode)

Trims the hostcode of reactions.


The documentation for this class was generated from the following file:
  • /Users/runner/work/lingua-franca/lingua-franca/core/src/main/java/org/lflang/diagram/synthesis/util/UtilityExtensions.java