Class TDLModule

    • Constructor Detail

      • TDLModule

        public TDLModule​(Workspace workspace)
                  throws IllegalActionException,
                         NameDuplicationException
        Construct a tdl module in the specified workspace with no container and an empty string as a name. You can then change the name with setName(). If the workspace argument is null, then use the default workspace.
        Parameters:
        workspace - The workspace that will list the actor.
        Throws:
        IllegalActionException - If the name has a period in it, or the director is not compatible with the specified container.
        NameDuplicationException - If the container already contains an entity with the specified name.
    • Method Detail

      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        React to a change of the director or other property. needs to be overridden because of the director class that should always be TDLModuleDirector.
        Overrides:
        attributeChanged in class ModalModel
        Parameters:
        attribute - Attribute to be changed.
        Throws:
        IllegalActionException - Thrown if director of the module, the TDLModuleDirector, cannot be set.
      • clone

        public java.lang.Object clone​(Workspace workspace)
                               throws java.lang.CloneNotSupportedException
        Override the base class to ensure that the _controller private variable is reset to the controller of the cloned object.
        Overrides:
        clone in class ModalModel
        Parameters:
        workspace - The workspace for the cloned object.
        Returns:
        The new Entity.
        Throws:
        java.lang.CloneNotSupportedException - If cloned ports cannot have as their container the cloned entity (this should not occur), or if one of the attributes cannot be cloned.
        See Also:
        NamedObj.exportMoML(Writer, int, String), NamedObj.setDeferringChangeRequests(boolean)
      • newPort

        public Port newPort​(java.lang.String name)
                     throws NameDuplicationException
        Create a new port with the specified name in this entity, the controller, and all the refinements. Link these ports so that if the new port is set to be an input, output, or multiport, then the change is mirrored in the other ports. The new port will be an instance of ModalPort, which extends TypedIOPort. This method is write-synchronized on the workspace, and increments its version number.
        Overrides:
        newPort in class ModalModel
        Parameters:
        name - The name to assign to the newly created port.
        Returns:
        The new port.
        Throws:
        NameDuplicationException - If the entity already has a port with the specified name.