Class ScopeFmi2Api

  • All Implemented Interfaces:
    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>, org.intocps.maestro.framework.fmi2.api.Fmi2Builder.WhileScope<org.intocps.maestro.ast.node.PStm>, IMablScope
    Direct Known Subclasses:
    WhileMaBLScope

    public class ScopeFmi2Api
    extends java.lang.Object
    implements IMablScope, org.intocps.maestro.framework.fmi2.api.Fmi2Builder.WhileScope<org.intocps.maestro.ast.node.PStm>
    • Constructor Detail

      • ScopeFmi2Api

        public ScopeFmi2Api​(MablApiBuilder builder,
                            org.intocps.maestro.framework.fmi2.api.Fmi2Builder.ScopeElement<org.intocps.maestro.ast.node.PStm> parent,
                            org.intocps.maestro.ast.node.SBlockStm block)
    • Method Detail

      • getBlock

        public org.intocps.maestro.ast.node.SBlockStm getBlock()
      • enterWhile

        public WhileMaBLScope enterWhile​(org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Predicate predicate)
        Specified by:
        enterWhile in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>
        Specified by:
        enterWhile in interface IMablScope
      • enterTry

        public TryMaBlScope enterTry()
        Specified by:
        enterTry in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>
        Specified by:
        enterTry in interface IMablScope
      • enterIf

        public IfMaBlScope enterIf​(org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Predicate predicate)
        Specified by:
        enterIf in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>
        Specified by:
        enterIf in interface IMablScope
      • parallel

        public IMablScope parallel()
        Specified by:
        parallel in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>
        Specified by:
        parallel in interface IMablScope
      • leave

        public ScopeFmi2Api leave()
        Specified by:
        leave in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>
        Specified by:
        leave in interface IMablScope
      • add

        public void add​(org.intocps.maestro.ast.node.PStm... commands)
        Specified by:
        add in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>
        Specified by:
        add in interface IMablScope
      • addAll

        public void addAll​(java.util.Collection<org.intocps.maestro.ast.node.PStm> commands)
        Specified by:
        addAll in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>
        Specified by:
        addAll in interface IMablScope
      • addBefore

        public void addBefore​(org.intocps.maestro.ast.node.PStm item,
                              org.intocps.maestro.ast.node.PStm... commands)
        Specified by:
        addBefore in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>
        Specified by:
        addBefore in interface IMablScope
      • addAfter

        public void addAfter​(org.intocps.maestro.ast.node.PStm item,
                             org.intocps.maestro.ast.node.PStm... commands)
        Specified by:
        addAfter in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>
        Specified by:
        addAfter in interface IMablScope
      • addAfterOrTop

        public void addAfterOrTop​(org.intocps.maestro.ast.node.PStm item,
                                  org.intocps.maestro.ast.node.PStm... commands)
        Attempts to find item and places commands after it. If item is not found, then commands is added at the top of the scope.
        Specified by:
        addAfterOrTop in interface IMablScope
        Parameters:
        item -
        commands -
      • indexOf

        public int indexOf​(org.intocps.maestro.ast.node.PStm stm)
        Specified by:
        indexOf in interface IMablScope
      • activate

        public ScopeFmi2Api activate()
        Specified by:
        activate in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>
        Specified by:
        activate in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>
        Specified by:
        activate in interface IMablScope
      • store

        public DoubleVariableFmi2Api store​(double value)
        Specified by:
        store in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>
        Specified by:
        store in interface IMablScope
      • store

        public StringVariableFmi2Api store​(java.lang.String value)
        Specified by:
        store in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>
        Specified by:
        store in interface IMablScope
      • store

        public BooleanVariableFmi2Api store​(boolean value)
        Specified by:
        store in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>
        Specified by:
        store in interface IMablScope
      • store

        public IntVariableFmi2Api store​(int value)
        Specified by:
        store in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>
        Specified by:
        store in interface IMablScope
      • store

        public DoubleVariableFmi2Api store​(java.lang.String prefix,
                                           double value)
        Specified by:
        store in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>
        Specified by:
        store in interface IMablScope
      • store

        public StringVariableFmi2Api store​(java.lang.String prefix,
                                           java.lang.String value)
        Specified by:
        store in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>
        Specified by:
        store in interface IMablScope
      • store

        public BooleanVariableFmi2Api store​(java.lang.String name,
                                            boolean value)
        Specified by:
        store in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>
        Specified by:
        store in interface IMablScope
      • store

        public IntVariableFmi2Api store​(java.lang.String name,
                                        int value)
        Specified by:
        store in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>
        Specified by:
        store in interface IMablScope
      • store

        public <V> ArrayVariableFmi2Api<V> store​(java.lang.String name,
                                                 V[] value)
        Specified by:
        store in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>
        Specified by:
        store in interface IMablScope
      • store

        public DoubleVariableFmi2Api store​(java.util.function.Supplier<java.lang.String> nameProvider,
                                           double value)
      • store

        public BooleanVariableFmi2Api store​(java.util.function.Supplier<java.lang.String> nameProvider,
                                            boolean value)
      • store

        public IntVariableFmi2Api store​(java.util.function.Supplier<java.lang.String> nameProvider,
                                        int value)
      • store

        public StringVariableFmi2Api store​(java.util.function.Supplier<java.lang.String> nameProvider,
                                           java.lang.String value)
      • store

        protected <V> ArrayVariableFmi2Api<V> store​(java.util.function.Supplier<java.lang.String> nameProvider,
                                                    V[] value)
      • getName

        public java.lang.String getName​(java.lang.String prefix)
        Specified by:
        getName in interface IMablScope
      • enterScope

        public IMablScope enterScope()
        Specified by:
        enterScope in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scoping<org.intocps.maestro.ast.node.PStm>
        Specified by:
        enterScope in interface IMablScope
      • 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:
        store in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>
        Specified by:
        store in interface IMablScope
      • createFMU

        public FmuVariableFmi2Api createFMU​(java.lang.String name,
                                            java.lang.String loaderName,
                                            java.lang.String... args)
                                     throws java.lang.Exception
        Specified by:
        createFMU in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.Scope<org.intocps.maestro.ast.node.PStm>
        Specified by:
        createFMU in interface IMablScope
        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:
        createFMU in interface IMablScope
        Throws:
        java.lang.Exception
      • parent

        public org.intocps.maestro.framework.fmi2.api.Fmi2Builder.ScopeElement<org.intocps.maestro.ast.node.PStm> parent()
        Specified by:
        parent in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.ScopeElement<org.intocps.maestro.ast.node.PStm>
        Specified by:
        parent in interface IMablScope
      • getDeclaration

        public org.intocps.maestro.ast.node.PStm getDeclaration()
        Specified by:
        getDeclaration in interface org.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:
        findParent in interface org.intocps.maestro.framework.fmi2.api.Fmi2Builder.ScopeElement<org.intocps.maestro.ast.node.PStm>
      • findParentScope

        public <S> S findParentScope​(java.lang.Class<S> type)
        Specified by:
        findParentScope in interface IMablScope