Package ptolemy.chic
Class ChicInvoker
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.chic.ChicInvoker
-
- All Implemented Interfaces:
java.lang.Cloneable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class ChicInvoker extends Attribute
This attribute is a visible attribute used for invoking Chic (Checker for Interface Compatibility) on its container. Chic is invoked by right clicking on the attribute and selecting one of the options: "CHIC: Asynchronous I/O" and "CHIC: Synchronous A/G". The expression of the InterfaceName attribute specifies the name of the ChicAttribute that is going to be used upon invocation of Chic. Note that every directly or indirectly contained port of the attribute's container must have a name syntactically equivalent to a Java identifier.- Since:
- Ptolemy II 3.0
- Version:
- $Id$
- Author:
- Eleftherios Matsikoudis
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description static int
ASYNCHRONOUS_IO
Indicate use of the Asynchronous I/O compiler.StringAttribute
chicAttributeName
A StringAttribute representing the name of the ChicAttributes that are to be queried while collecting the interfaces upon which Chic is to be invoked.static int
SYNCHRONOUS_AG
Indicate use of the Synchronous A/G compiler.-
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 ChicInvoker(NamedObj container, java.lang.String name)
Construct an attribute with the specified container and name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
_checkInterfaceCompatibility(CompositeActor model, int compiler, boolean silent, java.lang.String name)
Check the interface compatibility of all entities that are directly or indirectly contained by the model.boolean
checkInterfaceCompatibility(int compiler, boolean silent)
Check the interface compatibility of all entities that are directly or indirectly contained by the container of this attribute.-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, 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
-
-
-
-
Field Detail
-
chicAttributeName
public StringAttribute chicAttributeName
A StringAttribute representing the name of the ChicAttributes that are to be queried while collecting the interfaces upon which Chic is to be invoked.
-
ASYNCHRONOUS_IO
public static final int ASYNCHRONOUS_IO
Indicate use of the Asynchronous I/O compiler.- See Also:
- Constant Field Values
-
SYNCHRONOUS_AG
public static final int SYNCHRONOUS_AG
Indicate use of the Synchronous A/G compiler.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ChicInvoker
public ChicInvoker(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct an attribute with the specified container and name.- Parameters:
container
- The container.name
- The name of the attribute.- Throws:
IllegalActionException
- If the factory is not of an acceptable attribute for the container.NameDuplicationException
- If the name coincides with an attribute already in the container.
-
-
Method Detail
-
checkInterfaceCompatibility
public boolean checkInterfaceCompatibility(int compiler, boolean silent) throws IllegalActionException, NameDuplicationException
Check the interface compatibility of all entities that are directly or indirectly contained by the container of this attribute.- Parameters:
compiler
- The compiler of Chic to use.silent
- True if the interface compatibility checking is to be carried out without invoking the user interface of Chic.- Returns:
- True if the interfaces of the contained entities are compatible.
- Throws:
IllegalActionException
- If a port contained directly or indirectly by the model has width greater than one or is both an input and output port.NameDuplicationException
- If the container of the attribute or one of the contained entities already contains an attribute of class other than ChicAttribute with the same name as the expression of the InterfaceName.- See Also:
ASYNCHRONOUS_IO
,SYNCHRONOUS_AG
-
_checkInterfaceCompatibility
protected boolean _checkInterfaceCompatibility(CompositeActor model, int compiler, boolean silent, java.lang.String name) throws IllegalActionException, NameDuplicationException
Check the interface compatibility of all entities that are directly or indirectly contained by the model.- Parameters:
model
- The model to check interface compatibility.compiler
- The compiler of Chic to use.silent
- True if the interface compatibility checking is to be carried out without invoking the user interface of Chic.name
- The name of the ChicAttribute.- Returns:
- True if the interfaces of the contained entities are compatible.
- Throws:
IllegalActionException
- If a port contained directly or indirectly by the model has width greater than one or is both an input and output port.NameDuplicationException
- If the model or one of the contained entities already contains an attribute of class other than ChicAttribute with the same name as name.- See Also:
ASYNCHRONOUS_IO
,SYNCHRONOUS_AG
-
-