Class ModalController

    • Constructor Detail

      • ModalController

        public ModalController​(ModalController component)
        Construct the code generator helper associated with the given modal controller.
        Parameters:
        component - The associated component.
    • Method Detail

      • generateFireCode

        public java.lang.String generateFireCode()
                                          throws IllegalActionException
        Generate the fire code of the associated controller. All the steps are described below It is slightly different from the super class in order to take into account the receivers (if embedded in a DE model)
        Overrides:
        generateFireCode in class ModalController
        Returns:
        The fire code of the associated controller.
        Throws:
        IllegalActionException - If the adapter associated with an actor throws it while generating fire code for the actor
      • generatePostfireCode

        public java.lang.String generatePostfireCode()
                                              throws IllegalActionException
        Generate the postfire code of the associated controller. We generate a switch because we only need to call the postfire method of the current state.
        Overrides:
        generatePostfireCode in class NamedProgramCodeGeneratorAdapter
        Returns:
        The postfire code of the associated controller.
        Throws:
        IllegalActionException - If the adapter associated with an actor throws it while generating postfire code for the actor
      • _generateRefinementCode

        protected boolean _generateRefinementCode​(java.lang.StringBuffer code)
                                           throws IllegalActionException
        Generate code for the firing of refinements.
        Overrides:
        _generateRefinementCode in class ModalController
        Parameters:
        code - The string buffer that the generated code is appended to.
        Returns:
        true if any of the states had refinements.
        Throws:
        IllegalActionException - If the helper associated with an actor throws it while generating fire code for the actor.