Class DynamicActiveBuilderScope
- java.lang.Object
-
- org.intocps.maestro.framework.fmi2.api.mabl.scoping.DynamicActiveBuilderScope
-
- All Implemented Interfaces:
org.intocps.maestro.framework.fmi2.api.Fmi2Builder.DynamicActiveScope<org.intocps.maestro.ast.node.PStm>,org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>,org.intocps.maestro.framework.fmi2.api.Fmi2Builder.ScopeElement<org.intocps.maestro.ast.node.PStm>,org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>,IMablScope
public class DynamicActiveBuilderScope extends java.lang.Object implements IMablScope, org.intocps.maestro.framework.fmi2.api.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)voidaddAfterOrTop(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.Fmi2ModelDescription modelDescription, java.net.URI path)IfMaBlScopeenterIf(org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Predicate predicate)IMablScopeenterScope()TryMaBlScopeenterTry()WhileMaBLScopeenterWhile(org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Predicate predicate)<P extends org.intocps.maestro.framework.fmi2.api.Fmi2Builder.ScopeElement<org.intocps.maestro.ast.node.PStm>>
PfindParent(java.lang.Class<P> clz)<S> SfindParentScope(java.lang.Class<S> type)IMablScopegetActiveScope()java.util.Set<ComponentVariableFmi2Api>getAllComponentFmi2Variables()Retrieves a set of allComponentFmi2Variables including those of parentsorg.intocps.maestro.ast.node.PStmgetDeclaration()IntVariableFmi2ApigetFmiStatusVariable()java.lang.StringgetName(java.lang.String prefix)intindexOf(org.intocps.maestro.ast.node.PStm stm)ScopeFmi2Apileave()IMablScopeparallel()org.intocps.maestro.framework.fmi2.api.Fmi2Builder.ScopeElement<org.intocps.maestro.ast.node.PStm>parent()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)IntVariableFmi2Apistore(int value)StringVariableFmi2Apistore(java.lang.String value)BooleanVariableFmi2Apistore(java.lang.String name, boolean value)DoubleVariableFmi2Apistore(java.lang.String name, double value)IntVariableFmi2Apistore(java.lang.String name, int value)StringVariableFmi2Apistore(java.lang.String name, java.lang.String value)DoubleVariableFmi2Apistore(java.lang.String namePrefix, DoubleVariableFmi2Api variable)IntVariableFmi2Apistore(java.lang.String namePrefix, IntVariableFmi2Api variable)<V> ArrayVariableFmi2Api<V>store(java.lang.String name, V[] value)<V> org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Variable<org.intocps.maestro.ast.node.PStm,V>store(org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Value<V> tag)ArrayVariableFmi2ApistoreInArray(java.lang.String name, VariableFmi2Api[] variables)
-
-
-
Constructor Detail
-
DynamicActiveBuilderScope
public DynamicActiveBuilderScope(ScopeFmi2Api root)
-
-
Method Detail
-
getActiveScope
public IMablScope getActiveScope()
-
activate
public IMablScope activate(ScopeFmi2Api activeScope)
-
enterWhile
public WhileMaBLScope enterWhile(org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Predicate predicate)
- Specified by:
enterWhilein interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
enterWhilein interfaceIMablScope
-
enterIf
public IfMaBlScope enterIf(org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Predicate predicate)
- Specified by:
enterIfin interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
enterIfin interfaceIMablScope
-
parallel
public IMablScope parallel()
- Specified by:
parallelin interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
parallelin interfaceIMablScope
-
leave
public ScopeFmi2Api leave()
- Specified by:
leavein interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
leavein interfaceIMablScope
-
parent
public org.intocps.maestro.framework.fmi2.api.Fmi2Builder.ScopeElement<org.intocps.maestro.ast.node.PStm> parent()
- Specified by:
parentin interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.ScopeElement<org.intocps.maestro.ast.node.PStm>- Specified by:
parentin interfaceIMablScope
-
getDeclaration
public org.intocps.maestro.ast.node.PStm getDeclaration()
- Specified by:
getDeclarationin interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.ScopeElement<org.intocps.maestro.ast.node.PStm>
-
findParent
public <P extends org.intocps.maestro.framework.fmi2.api.Fmi2Builder.ScopeElement<org.intocps.maestro.ast.node.PStm>> P findParent(java.lang.Class<P> clz)
- Specified by:
findParentin interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.ScopeElement<org.intocps.maestro.ast.node.PStm>
-
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 interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
enterScopein interfaceIMablScope
-
enterTry
public TryMaBlScope enterTry()
- Specified by:
enterTryin interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
enterTryin interfaceIMablScope
-
store
public BooleanVariableFmi2Api store(boolean value)
- Specified by:
storein interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.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 interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.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 interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.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 interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.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 interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
addAfterin interfaceIMablScope
-
addAfterOrTop
public void addAfterOrTop(org.intocps.maestro.ast.node.PStm item, org.intocps.maestro.ast.node.PStm... commands)- Specified by:
addAfterOrTopin interfaceIMablScope
-
indexOf
public int indexOf(org.intocps.maestro.ast.node.PStm stm)
- Specified by:
indexOfin interfaceIMablScope
-
activate
public IMablScope activate()
- Specified by:
activatein interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
activatein interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>- Specified by:
activatein interfaceIMablScope
-
store
public DoubleVariableFmi2Api store(double value)
- Specified by:
storein interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public StringVariableFmi2Api store(java.lang.String value)
- Specified by:
storein interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public IntVariableFmi2Api store(int value)
- Specified by:
storein interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public DoubleVariableFmi2Api store(java.lang.String name, double value)
- Specified by:
storein interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public StringVariableFmi2Api store(java.lang.String name, java.lang.String value)
- Specified by:
storein interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public BooleanVariableFmi2Api store(java.lang.String name, boolean value)
- Specified by:
storein interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public IntVariableFmi2Api store(java.lang.String name, int value)
- Specified by:
storein interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.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 interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public <V> org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Variable<org.intocps.maestro.ast.node.PStm,V> store(org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Value<V> tag)
- Specified by:
storein interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>- Specified by:
storein interfaceIMablScope
-
store
public IntVariableFmi2Api store(java.lang.String namePrefix, IntVariableFmi2Api variable)
- Specified by:
storein interfaceIMablScope
-
store
public DoubleVariableFmi2Api store(java.lang.String namePrefix, DoubleVariableFmi2Api variable)
- Specified by:
storein interfaceIMablScope
-
storeInArray
public ArrayVariableFmi2Api storeInArray(java.lang.String name, VariableFmi2Api[] variables)
- Specified by:
storeInArrayin interfaceIMablScope
-
createFMU
public FmuVariableFmi2Api createFMU(java.lang.String name, java.lang.String loaderName, java.lang.String... args) throws java.lang.Exception
- Specified by:
createFMUin interfaceorg.intocps.maestro.framework.fmi2.api.Fmi2Builder.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.Fmi2ModelDescription 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
-
findParentScope
public <S> S findParentScope(java.lang.Class<S> type)
- Specified by:
findParentScopein interfaceIMablScope
-
-