Class DynamicActiveBuilderScope
- java.lang.Object
-
- org.intocps.maestro.framework.fmi2.api.mabl.scoping.DynamicActiveBuilderScope
-
- All Implemented Interfaces:
Fmi2Builder.DynamicActiveScope<org.intocps.maestro.ast.node.PStm>,Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>,Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>,IMablScope
public class DynamicActiveBuilderScope extends java.lang.Object implements IMablScope, Fmi2Builder.DynamicActiveScope<org.intocps.maestro.ast.node.PStm>
-
-
Constructor Summary
Constructors Constructor Description DynamicActiveBuilderScope(ScopeFmi2Api root)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IMablScopeactivate()IMablScopeactivate(ScopeFmi2Api activeScope)voidadd(org.intocps.maestro.ast.node.PStm... commands)voidaddAfter(org.intocps.maestro.ast.node.PStm item, org.intocps.maestro.ast.node.PStm... commands)voidaddAll(java.util.Collection<org.intocps.maestro.ast.node.PStm> commands)voidaddBefore(org.intocps.maestro.ast.node.PStm item, org.intocps.maestro.ast.node.PStm... commands)<Var extends VariableFmi2Api>
Varcopy(java.lang.String name, Var variable)FmuVariableFmi2ApicreateFMU(java.lang.String name, java.lang.String loaderName, java.lang.String... args)FmuVariableFmi2ApicreateFMU(java.lang.String name, org.intocps.maestro.fmi.ModelDescription modelDescription, java.net.URI path)IfMaBlScopeenterIf(Fmi2Builder.Predicate predicate)IMablScopeenterScope()WhileMaBLScopeenterWhile(Fmi2Builder.Predicate predicate)IMablScopegetActiveScope()java.util.Set<ComponentVariableFmi2Api>getAllComponentFmi2Variables()Retrieves a set of allComponentFmi2Variables including those of parentsIntVariableFmi2ApigetFmiStatusVariable()java.lang.StringgetName(java.lang.String prefix)ScopeFmi2Apileave()IMablScopeparallel()voidregisterComponentVariableFmi2Api(ComponentVariableFmi2Api componentVariableFmi2Api)This is used to maintain a register of stored ComponentVariableFmi2API, such that they can be freed in case of an error.BooleanVariableFmi2Apistore(boolean value)DoubleVariableFmi2Apistore(double value)Store a given valueIntVariableFmi2Apistore(int value)StringVariableFmi2Apistore(java.lang.String value)BooleanVariableFmi2Apistore(java.lang.String name, boolean value)DoubleVariableFmi2Apistore(java.lang.String name, double value)Store a given value with a prefix nameIntVariableFmi2Apistore(java.lang.String name, int value)StringVariableFmi2Apistore(java.lang.String name, java.lang.String value)IntVariableFmi2Apistore(java.lang.String stabilisation_loop, IntVariableFmi2Api stabilisation_loop_max_iterations)<V> ArrayVariableFmi2Api<V>store(java.lang.String name, V[] value)<V> Fmi2Builder.Variable<org.intocps.maestro.ast.node.PStm,V>store(Fmi2Builder.Value<V> tag)Store the given value and get a tag for it.
-
-
-
Constructor Detail
-
DynamicActiveBuilderScope
public DynamicActiveBuilderScope(ScopeFmi2Api root)
-
-
Method Detail
-
getActiveScope
public IMablScope getActiveScope()
-
activate
public IMablScope activate(ScopeFmi2Api activeScope)
-
enterWhile
public WhileMaBLScope enterWhile(Fmi2Builder.Predicate predicate)
- Specified by:
enterWhilein interfaceFmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
enterWhilein interfaceIMablScope
-
enterIf
public IfMaBlScope enterIf(Fmi2Builder.Predicate predicate)
- Specified by:
enterIfin interfaceFmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
enterIfin interfaceIMablScope
-
parallel
public IMablScope parallel()
- Specified by:
parallelin interfaceFmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
parallelin interfaceIMablScope
-
leave
public ScopeFmi2Api leave()
- Specified by:
leavein interfaceFmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
leavein interfaceIMablScope
-
getFmiStatusVariable
public IntVariableFmi2Api getFmiStatusVariable()
- Specified by:
getFmiStatusVariablein interfaceIMablScope
-
getName
public java.lang.String getName(java.lang.String prefix)
- Specified by:
getNamein interfaceIMablScope
-
enterScope
public IMablScope enterScope()
- Specified by:
enterScopein interfaceFmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
enterScopein interfaceIMablScope
-
store
public BooleanVariableFmi2Api store(boolean value)
- Specified by:
storein interfaceFmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
add
public void add(org.intocps.maestro.ast.node.PStm... commands)
- Specified by:
addin interfaceFmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
addin interfaceIMablScope
-
addAll
public void addAll(java.util.Collection<org.intocps.maestro.ast.node.PStm> commands)
- Specified by:
addAllin interfaceFmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
addAllin interfaceIMablScope
-
addBefore
public void addBefore(org.intocps.maestro.ast.node.PStm item, org.intocps.maestro.ast.node.PStm... commands)- Specified by:
addBeforein interfaceFmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
addBeforein interfaceIMablScope
-
addAfter
public void addAfter(org.intocps.maestro.ast.node.PStm item, org.intocps.maestro.ast.node.PStm... commands)- Specified by:
addAfterin interfaceFmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
addAfterin interfaceIMablScope
-
activate
public IMablScope activate()
- Specified by:
activatein interfaceFmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
activatein interfaceFmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
activatein interfaceIMablScope
-
store
public DoubleVariableFmi2Api store(double value)
Description copied from interface:Fmi2Builder.ScopeStore a given value- Specified by:
storein interfaceFmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope- Returns:
-
store
public StringVariableFmi2Api store(java.lang.String value)
- Specified by:
storein interfaceFmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public IntVariableFmi2Api store(int value)
- Specified by:
storein interfaceFmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public DoubleVariableFmi2Api store(java.lang.String name, double value)
Description copied from interface:Fmi2Builder.ScopeStore a given value with a prefix name- Specified by:
storein interfaceFmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope- Returns:
-
store
public StringVariableFmi2Api store(java.lang.String name, java.lang.String value)
- Specified by:
storein interfaceFmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public BooleanVariableFmi2Api store(java.lang.String name, boolean value)
- Specified by:
storein interfaceFmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public IntVariableFmi2Api store(java.lang.String name, int value)
- Specified by:
storein interfaceFmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public <V> ArrayVariableFmi2Api<V> store(java.lang.String name, V[] value)
- Specified by:
storein interfaceFmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public <V> Fmi2Builder.Variable<org.intocps.maestro.ast.node.PStm,V> store(Fmi2Builder.Value<V> tag)
Description copied from interface:Fmi2Builder.ScopeStore the given value and get a tag for it. Copy- Specified by:
storein interfaceFmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope- Returns:
-
store
public IntVariableFmi2Api store(java.lang.String stabilisation_loop, IntVariableFmi2Api stabilisation_loop_max_iterations)
- Specified by:
storein interfaceIMablScope
-
createFMU
public FmuVariableFmi2Api createFMU(java.lang.String name, java.lang.String loaderName, java.lang.String... args) throws java.lang.Exception
- Specified by:
createFMUin interfaceFmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
createFMUin interfaceIMablScope- Throws:
java.lang.Exception
-
createFMU
public FmuVariableFmi2Api createFMU(java.lang.String name, org.intocps.maestro.fmi.ModelDescription modelDescription, java.net.URI path) throws java.lang.Exception
- Specified by:
createFMUin interfaceIMablScope- Throws:
java.lang.Exception
-
copy
public <Var extends VariableFmi2Api> Var copy(java.lang.String name, Var variable)
- Specified by:
copyin interfaceIMablScope
-
getAllComponentFmi2Variables
public java.util.Set<ComponentVariableFmi2Api> getAllComponentFmi2Variables()
Description copied from interface:IMablScopeRetrieves a set of allComponentFmi2Variables including those of parents- Specified by:
getAllComponentFmi2Variablesin interfaceIMablScope- Returns:
-
registerComponentVariableFmi2Api
public void registerComponentVariableFmi2Api(ComponentVariableFmi2Api componentVariableFmi2Api)
Description copied from interface:IMablScopeThis is used to maintain a register of stored ComponentVariableFmi2API, such that they can be freed in case of an error.- Specified by:
registerComponentVariableFmi2Apiin interfaceIMablScope
-
-