Package ptolemy.actor.parameters
Class ParameterMirrorPort
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.Port
-
- ptolemy.kernel.ComponentPort
-
- ptolemy.actor.IOPort
-
- ptolemy.actor.TypedIOPort
-
- ptolemy.actor.parameters.ParameterPort
-
- ptolemy.actor.parameters.ParameterMirrorPort
-
- All Implemented Interfaces:
java.lang.Cloneable
,HasTypeConstraints
,Typeable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class ParameterMirrorPort extends ParameterPort
This port mirrors properties of associated parameter ports.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Patricia Derler
- Pt.AcceptedRating:
- Red (derler)
- Pt.ProposedRating:
- Yellow (derler)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.actor.TypedIOPort
TypedIOPort.RunTimeTypeCheckException
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
-
Fields inherited from class ptolemy.actor.parameters.ParameterPort
_parameter
-
Fields inherited from class ptolemy.actor.TypedIOPort
_resolvedType, TYPE
-
Fields inherited from class ptolemy.actor.IOPort
_constantLimit, _constantToken, _constantTokensSent, _hasPortEventListeners, _portEventListeners, CONFIGURATION, defaultValue, RECEIVERS, REMOTERECEIVERS
-
Fields inherited from class ptolemy.kernel.Port
_insideLinks, _relationsList
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
-
Constructor Summary
Constructors Constructor Description ParameterMirrorPort(ComponentEntity container, java.lang.String name)
Construct a new input port in the specified container with the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone(Workspace workspace)
Clone the object into the specified workspace.ParameterMirrorPort
getAssociatedPort()
Return the associated port, or null if there is none.void
setAssociatedPort(ParameterMirrorPort port)
Specify an associated port.void
setContainer(Entity container)
Override the base class so that if the container is being set to null, then the associated port is also deleted (via a change request).void
setInput(boolean isInput)
Override the base class to also set the associated port, if there is one.void
setName(java.lang.String name)
Override the base class to also set the associated port, if there is one.-
Methods inherited from class ptolemy.actor.parameters.ParameterPort
_setTypeConstraints, getParameter, setDisplayName
-
Methods inherited from class ptolemy.actor.TypedIOPort
_checkContainer, _checkLiberalLink, _checkLink, _checkType, _checkTypedIOPortContainer, _description, addTypeListener, attributeChanged, broadcast, broadcast, convert, getAutomaticTypeConversion, getType, getTypeTerm, isTypeAcceptable, removeTypeListener, send, send, sendInside, setAutomaticTypeConversion, setTypeAtLeast, setTypeAtLeast, setTypeAtMost, setTypeEquals, setTypeSameAs, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.IOPort
_checkLiberalLink, _exportMoMLContents, _getInsideWidth, _getOutsideWidth, _getReceiversLinkedToGroup, _newInsideReceiver, _newInsideReceiver, _newReceiver, _newReceiver, _notifyPortEventListeners, _removeReceivers, _setConstant, _wrapReceiver, addIOPortEventListener, broadcastClear, checkWidthConstraints, createReceivers, deepConnectedInPortList, deepConnectedInPorts, deepConnectedOutPortList, deepConnectedOutPorts, deepGetReceivers, get, get, getChannelForReceiver, getCommunicationAspects, getCurrentTime, getDefaultWidth, getInside, getInsideReceivers, getIOPortEventListeners, getModelTime, getModelTime, getReceivers, getReceivers, getReceivers, getRelationIndex, getRemoteReceivers, getRemoteReceivers, getWidth, getWidthFromConstraints, getWidthInside, hasNewToken, hasNewTokenInside, hasRoom, hasRoomInside, hasToken, hasToken, hasTokenInside, hasWidthConstraints, insertLink, insideSinkPortList, insideSourcePortList, invalidateCommunicationAspects, isInput, isInsideConnected, isKnown, isKnown, isKnownInside, isMultiport, isOutput, isOutsideConnected, liberalLink, link, numberOfSinks, numberOfSources, removeIOPortEventListener, reset, sendClear, sendClearInside, setDefaultWidth, setMultiport, setOutput, setWidthEquals, setWidthEquals, sinkPortList, sourcePortList, transferInputs, transferOutputs, unlink, unlink, unlinkAll, unlinkAllInside, unlinkInside, unlinkInside
-
Methods inherited from class ptolemy.kernel.ComponentPort
_deepConnectedPortList, _deepConnectedPorts, _deepInsidePortList, _deepInsidePorts, _isInsideLinkable, deepConnectedPortList, deepConnectedPorts, deepInsidePortList, deepInsidePorts, insertInsideLink, insidePortList, insidePorts, insideRelationList, insideRelations, isDeeplyConnected, isInsideGroupLinked, isInsideLinked, isOpaque, numInsideLinks
-
Methods inherited from class ptolemy.kernel.Port
_getContainedObject, _propagateExistence, connectedPortList, connectedPorts, getContainer, isGroupLinked, isLinked, linkedRelationList, linkedRelations, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, numLinks
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
-
-
-
-
Constructor Detail
-
ParameterMirrorPort
public ParameterMirrorPort(ComponentEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct a new input port in the specified container with the specified name. The specified container must implement the Actor interface, or an exception will be thrown.- Parameters:
container
- The container.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 Actor interface.NameDuplicationException
- If the name coincides with a port already in the container.
-
-
Method Detail
-
clone
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
Clone the object into the specified workspace. This overrides the base class to unset the associated port. Users of this class are responsible for resetting it in their clone methods.- Overrides:
clone
in classParameterPort
- Parameters:
workspace
- The workspace for the new object.- Returns:
- A new NamedObj.
- Throws:
java.lang.CloneNotSupportedException
- If any of the attributes cannot be cloned.- See Also:
NamedObj.exportMoML(java.io.Writer, int, String)
-
getAssociatedPort
public ParameterMirrorPort getAssociatedPort()
Return the associated port, or null if there is none.- Returns:
- The associated port, or null if there is none.
- See Also:
setAssociatedPort(ParameterMirrorPort)
-
setAssociatedPort
public void setAssociatedPort(ParameterMirrorPort port)
Specify an associated port. Once this is specified, then any changes made to this port (its name, whether it is an input or output, and whether it is a multiport) are mirrored in the associated port, and any changes made in the associated port are mirrored here.- Parameters:
port
- The associated port.- See Also:
getAssociatedPort()
-
setContainer
public void setContainer(Entity container) throws IllegalActionException, NameDuplicationException
Override the base class so that if the container is being set to null, then the associated port is also deleted (via a change request). Note that if the container of this port is changed to something other than null, there is no reasonable basis for changing the container of the associated port, so it is left unchanged.- Overrides:
setContainer
in classParameterPort
- Parameters:
container
- The proposed container.- Throws:
IllegalActionException
- If the proposed container is not a ComponentEntity, doesn't implement Actor, or has no name, or the port and container are not in the same workspace. Or it's not nullNameDuplicationException
- If the container already has a port with the name of this port.- See Also:
PortParameter
-
setInput
public void setInput(boolean isInput) throws IllegalActionException
Override the base class to also set the associated port, if there is one.- Overrides:
setInput
in classIOPort
- Parameters:
isInput
- True to make this an input port.- Throws:
IllegalActionException
- If changing the port status is not permitted.
-
setName
public void setName(java.lang.String name) throws IllegalActionException, NameDuplicationException
Override the base class to also set the associated port, if there is one.- Specified by:
setName
in interfaceNameable
- Overrides:
setName
in classParameterPort
- Parameters:
name
- The name of the port.- Throws:
IllegalActionException
- If name cannot be set.NameDuplicationException
- If port with the name already exists.- See Also:
NamedObj.getName()
,NamedObj.getName(NamedObj)
-
-