public class TypedIORelation extends IORelation
To link a TypedIOPort to a TypedIORelation, use the link() or liberalLink() method in the TypedIOPort class. To remove a link, use the unlink() method.
The container for instances of this class can only be instances of TypedCompositeActor. Derived classes may wish to further constrain the container to subclasses of TypedComponentEntity. To do this, they should override the _checkContainer() method.
Green (liuxj) |
Green (yuhong) |
NamedObj.ContainedObjectsIterator
_USE_NEW_WIDTH_INFERENCE_ALGO, CONFIGURATION, width, WIDTH_TO_INFER
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
TypedIORelation()
Construct a relation in the default workspace with an empty string
as its name.
|
TypedIORelation(CompositeEntity container,
java.lang.String name)
Construct a relation with the given name contained by the specified
entity.
|
TypedIORelation(Workspace workspace)
Construct a relation in the specified workspace with an empty
string as a name.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_checkContainer(CompositeEntity container)
Override the method in the super class to constrain the
container to be an instance of TypedCompositeActor, or to be null.
|
protected void |
_checkPort(Port port)
Throw an exception if the specified port cannot be linked to this
relation (is not of class TypedIOPort).
|
protected void |
_checkRelation(Relation relation,
boolean symmetric)
Throw an exception if the specified relation is not an instance
of TypedIORelation.
|
_description, _setInferredWidth, _skipWidthInference, attributeChanged, clone, deepReceivers, getWidth, isWidthFixed, linkedDestinationPortList, linkedDestinationPortList, linkedDestinationPorts, linkedDestinationPorts, linkedSourcePortList, linkedSourcePortList, linkedSourcePorts, linkedSourcePorts, needsWidthInference, setContainer, setWidth
_propagateExistence, deepLinkedPortList, deepLinkedPorts, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, unlinkAll
_getContainedObject, link, linkedObjectsList, linkedPortList, linkedPortList, linkedPorts, linkedPorts, numLinks, relationGroupList, unlink
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _exportMoMLContents, _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, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
public TypedIORelation()
public TypedIORelation(Workspace workspace)
workspace
- The workspace that will list the relation.public TypedIORelation(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of the relation.IllegalActionException
- If the container is incompatible
with this relation.NameDuplicationException
- If the name coincides with
a relation already in the container.protected void _checkContainer(CompositeEntity container) throws IllegalActionException
_checkContainer
in class ComponentRelation
container
- The proposed container.IllegalActionException
- If the container is not a
TypedCompositeActor or null, or this relation and the container
are not in the same workspace.protected void _checkPort(Port port) throws IllegalActionException
_checkPort
in class IORelation
port
- The candidate port to link to.IllegalActionException
- If the port is not an
TypedIOPort.protected void _checkRelation(Relation relation, boolean symmetric) throws IllegalActionException
_checkRelation
in class IORelation
relation
- The relation to link to.symmetric
- If true, the call _checkRelation on the specified
relation with this as an argument.IllegalActionException
- If this port has no container,
or if this port is not an acceptable port for the specified
relation.