Class TypedCompositeActor

    • Constructor Detail

      • TypedCompositeActor

        public TypedCompositeActor​(TypedCompositeActor actor)
        Constructor method for the CompositeActor adapter.
        Parameters:
        actor - the associated actor
    • Method Detail

      • generateFireFunctionCode

        public java.lang.String generateFireFunctionCode()
                                                  throws IllegalActionException
        Generate The fire function code. This method is called when the firing code of each actor is not inlined. Each actor's firing code is in a function with the same name as that of the actor.
        Overrides:
        generateFireFunctionCode in class TypedCompositeActor
        Returns:
        The fire function code.
        Throws:
        IllegalActionException - If thrown while generating fire code.
      • generatePreinitializeCode

        public java.lang.String generatePreinitializeCode()
                                                   throws IllegalActionException
        Generate the preinitialize code. We do not call the super method, because we have arguments to add here This code contains the variable declarations
        Overrides:
        generatePreinitializeCode in class TypedCompositeActor
        Returns:
        The generated preinitialize code.
        Throws:
        IllegalActionException - If thrown while appending to the the block or processing the macros.
      • generatePreinitializeMethodBodyCode

        public java.lang.String generatePreinitializeMethodBodyCode()
                                                             throws IllegalActionException
        Generate the preinitialize code. We do not call the super method, because we have arguments to add here This code contains the different constructions and initializations.
        Overrides:
        generatePreinitializeMethodBodyCode in class TypedCompositeActor
        Returns:
        The generated preinitialize Method code.
        Throws:
        IllegalActionException - If thrown while appending to the the block or processing the macros.
      • setupAdapter

        public void setupAdapter()
                          throws IllegalActionException
        Set up adapters contained by the composite actor. This method is run very early in the code generation sequence, so adapters that need to set up code generation-time variables may have setupAdapter() methods that need to be invoked. Variables and shared code that are to be generated should be in generateSharedCode() or other methods, not this method.
        Overrides:
        setupAdapter in class TypedCompositeActor
        Throws:
        IllegalActionException - If the adapter associated with an actor throws it while being set up.
      • generateWrapupCode

        public java.lang.String generateWrapupCode()
                                            throws IllegalActionException
        Generate variable declarations for inputs and outputs and parameters. Append the declarations to the given string buffer.
        Overrides:
        generateWrapupCode in class TypedCompositeActor
        Returns:
        code The generated code.
        Throws:
        IllegalActionException - If the adapter class for the model director cannot be found.
      • getModifiedVariables

        public java.util.Set<Parameter> getModifiedVariables()
                                                      throws IllegalActionException
        Return a set of parameters that will be modified during the execution of the model. These parameters are those returned by getModifiedVariables() method of directors or actors that implement ExplicitChangeContext interface.
        Overrides:
        getModifiedVariables in class TypedCompositeActor
        Returns:
        a set of parameters that will be modified.
        Throws:
        IllegalActionException - If the adapter associated with an actor or director throws it while getting modified variables.