Package ptolemy.actor

Interface Initializable

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addInitializable​(Initializable initializable)
      Add the specified object to the set of objects whose preinitialize(), initialize(), and wrapup() methods should be invoked upon invocation of the corresponding methods of this object.
      void initialize()
      Begin execution of the actor.
      void preinitialize()
      This method should be invoked exactly once per execution of a model, before any of these other methods are invoked.
      void removeInitializable​(Initializable initializable)
      Remove the specified object from the set of objects whose preinitialize(), initialize(), and wrapup() methods should be invoked upon invocation of the corresponding methods of this object.
      void wrapup()
      This method is invoked exactly once per execution of an application.
    • Method Detail

      • addInitializable

        void addInitializable​(Initializable initializable)
        Add the specified object to the set of objects whose preinitialize(), initialize(), and wrapup() methods should be invoked upon invocation of the corresponding methods of this object.
        Parameters:
        initializable - The object whose methods should be invoked.
        See Also:
        removeInitializable(Initializable)
      • initialize

        void initialize()
                 throws IllegalActionException
        Begin execution of the actor. This is invoked exactly once after the preinitialization phase. Since type resolution is done in the preinitialization phase, along with topology changes that may be requested by higher-order function actors, an actor can produce output data and schedule events in the initialize() method.
        Throws:
        IllegalActionException - If execution is not permitted.
      • preinitialize

        void preinitialize()
                    throws IllegalActionException
        This method should be invoked exactly once per execution of a model, before any of these other methods are invoked. For actors, this is invoked prior to type resolution and may trigger changes in the topology, changes in the type constraints.
        Throws:
        IllegalActionException - If initializing is not permitted.
      • removeInitializable

        void removeInitializable​(Initializable initializable)
        Remove the specified object from the set of objects whose preinitialize(), initialize(), and wrapup() methods should be invoked upon invocation of the corresponding methods of this object. If the specified object is not on the list, do nothing.
        Parameters:
        initializable - The object whose methods should no longer be invoked.
        See Also:
        addInitializable(Initializable)
      • wrapup

        void wrapup()
             throws IllegalActionException
        This method is invoked exactly once per execution of an application. None of the other action methods should be be invoked after it. It finalizes an execution, typically closing files, displaying final results, etc. When this method is called, no further execution should occur.
        Throws:
        IllegalActionException - If wrapup is not permitted.