Class MultiCompositePort

    • Constructor Detail

      • MultiCompositePort

        public MultiCompositePort​(Workspace workspace)
                           throws IllegalActionException
        Construct a port in the given workspace.
        Parameters:
        workspace - The workspace.
        Throws:
        IllegalActionException - If the port is not of an acceptable class for the container, or if the container does not implement the TypedActor interface.
      • MultiCompositePort

        public MultiCompositePort​(ComponentEntity container,
                                  java.lang.String name)
                           throws IllegalActionException,
                                  NameDuplicationException
        Construct a port with a containing actor and a name that is neither an input nor an output. The specified container must implement the TypedActor interface, or an exception will be thrown.
        Parameters:
        container - The container actor.
        name - The name of the port.
        Throws:
        IllegalActionException - If the port is not of an acceptable class for the container, or if the container does not implement the TypedActor interface.
        NameDuplicationException - If the name coincides with a port already in the container.
    • Method Detail

      • moveDown

        public int moveDown()
                     throws IllegalActionException
        Move this object down by one in the list of attributes of its container. If this object is already last, do nothing. This method overrides the base class to mirror the change in any mirror ports. Increment the version of the workspace.
        Specified by:
        moveDown in interface Moveable
        Overrides:
        moveDown in class Port
        Returns:
        The index of the specified object prior to moving it, or -1 if it is not moved.
        Throws:
        IllegalActionException - If this object has no container.
      • moveToFirst

        public int moveToFirst()
                        throws IllegalActionException
        Move this object to the first position in the list of attributes of the container. If this object is already first, do nothing. Increment the version of the workspace. This method overrides the base class to mirror the change in any mirror ports.
        Specified by:
        moveToFirst in interface Moveable
        Overrides:
        moveToFirst in class Port
        Returns:
        The index of the specified object prior to moving it, or -1 if it is not moved.
        Throws:
        IllegalActionException - If this object has no container.
      • moveToIndex

        public int moveToIndex​(int index)
                        throws IllegalActionException
        Move this object to the specified position in the list of attributes of the container. If this object is already at the specified position, do nothing. This method overrides the base class to mirror the change in any mirror ports. Increment the version of the workspace.
        Specified by:
        moveToIndex in interface Moveable
        Overrides:
        moveToIndex in class Port
        Parameters:
        index - The position to move this object to.
        Returns:
        The index of the specified object prior to moving it, or -1 if it is not moved.
        Throws:
        IllegalActionException - If this object has no container or if the index is out of bounds.
      • moveToLast

        public int moveToLast()
                       throws IllegalActionException
        Move this object to the last position in the list of attributes of the container. If this object is already last, do nothing. This method overrides the base class to mirror the change in any mirror ports. Increment the version of the workspace.
        Specified by:
        moveToLast in interface Moveable
        Overrides:
        moveToLast in class Port
        Returns:
        The index of the specified object prior to moving it, or -1 if it is not moved.
        Throws:
        IllegalActionException - If this object has no container.
      • moveUp

        public int moveUp()
                   throws IllegalActionException
        Move this object up by one in the list of attributes of the container. If this object is already first, do nothing. This method overrides the base class to mirror the change in any mirror ports. Increment the version of the workspace.
        Specified by:
        moveUp in interface Moveable
        Overrides:
        moveUp in class Port
        Returns:
        The index of the specified object prior to moving it, or -1 if it is not moved.
        Throws:
        IllegalActionException - If this object has no container.
      • setInput

        public void setInput​(boolean isInput)
                      throws IllegalActionException
        If the argument is true, make the port an input port. If the argument is false, make the port not an input port. This method overrides the base class to make the same change on the mirror ports in the controller and state refinments. This method invalidates the schedule and resolved types of the director of the container, if there is one. It is write-synchronized on the workspace, and increments the version of the workspace.
        Overrides:
        setInput in class IOPort
        Parameters:
        isInput - True to make the port an input.
        Throws:
        IllegalActionException - If changing the port status is not permitted.
      • setMultiport

        public void setMultiport​(boolean isMultiport)
                          throws IllegalActionException
        If the argument is true, make the port a multiport. If the argument is false, make the port not a multiport. This method overrides the base class to make the same change on the mirror ports in the controller and state refinments. This method invalidates the schedule and resolved types of the director of the container, if there is one. It is write-synchronized on the workspace, and increments the version of the workspace.
        Overrides:
        setMultiport in class IOPort
        Parameters:
        isMultiport - True to make the port a multiport.
        Throws:
        IllegalActionException - If changing the port status is not permitted.
      • setOutput

        public void setOutput​(boolean isOutput)
                       throws IllegalActionException
        If the argument is true, make the port an output port. If the argument is false, make the port not an output port. This method overrides the base class to make the same change on the mirror ports in the controller and state refinments. This method invalidates the schedule and resolved types of the director of the container, if there is one. It is write-synchronized on the workspace, and increments the version of the workspace.
        Overrides:
        setOutput in class IOPort
        Parameters:
        isOutput - True to make the port an output.
        Throws:
        IllegalActionException - If changing the port status is not permitted.
      • _checkContainer

        protected void _checkContainer​(Entity container)
                                throws IllegalActionException
        Override the base class to ensure that the proposed container is a MultiCompositeActor or null.
        Overrides:
        _checkContainer in class TypedIOPort
        Parameters:
        container - The proposed container.
        Throws:
        IllegalActionException - If the proposed container is not a TypedActor, or if the base class throws it.