Class MultiCompositeActor

    • Constructor Detail

      • MultiCompositeActor

        public MultiCompositeActor​(Workspace workspace)
                            throws IllegalActionException,
                                   NameDuplicationException
        Construct a composite actor 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.
      • MultiCompositeActor

        public MultiCompositeActor​(CompositeEntity container,
                                   java.lang.String name)
                            throws IllegalActionException,
                                   NameDuplicationException
        Construct a composite actor with a name and a container. The container argument must not be null, or a NullPointerException will be thrown.
        Parameters:
        container - The container.
        name - The name of this actor.
        Throws:
        IllegalActionException - If the container is incompatible with this actor.
        NameDuplicationException - If the name coincides with an actor already in the container.
    • Method Detail

      • mirrorContainerPortsInRefinement

        public static void mirrorContainerPortsInRefinement​(Refinement refinement,
                                                            java.util.Set<Port> portsToMirror)
                                                     throws IllegalActionException,
                                                            NameDuplicationException
        Mirror a set of container ports in the refinement.
        Parameters:
        refinement - The refinement in which to create ports.
        portsToMirror - The ports to mirror in the refinement.
        Throws:
        IllegalActionException - If the port cannot be set to a multiport or to an output.
        NameDuplicationException - If a port cannot be added to the the refinement.
      • newPort

        public Port newPort​(java.lang.String name)
                     throws NameDuplicationException
        Create a new port with the specified name in this entity 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 MultiCompositePort, which extends TypedIOPort. This method is write-synchronized on the workspace, and increments its version number.
        Overrides:
        newPort in class TypedCompositeActor
        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.