|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ptolemy.kernel.util.NamedObj ptolemy.kernel.InstantiableNamedObj ptolemy.kernel.Entity ptolemy.kernel.ComponentEntity ptolemy.actor.AtomicActor ptolemy.actor.TypedAtomicActor
public class TypedAtomicActor
A TypedAtomicActor is an AtomicActor whose ports and parameters have types.
The typeConstraints() method returns the type constraints among the contained ports and parameters. This base class provides a default implementation of this method, which should be suitable for most of the derived classes.
Derived classes may constrain the container by overriding _checkContainer(). The Ports of TypedAtomicActors are constrained to be TypedIOPorts. Derived classes may further constrain the ports by overriding the public method newPort() to create a port of the appropriate subclass, and the protected method _addPort() to throw an exception if its argument is a port that is not of the appropriate subclass.
AtomicActor
,
TypedCompositeActor
,
TypedIOPort
,
Serialized Form
Green (cxh) |
Green (cxh) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.Entity |
---|
Entity.ContainedObjectsIterator |
Field Summary |
---|
Fields inherited from class ptolemy.actor.AtomicActor |
---|
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Fields inherited from interface ptolemy.actor.Executable |
---|
COMPLETED, NOT_READY, STOP_ITERATING |
Constructor Summary | |
---|---|
TypedAtomicActor()
Construct an actor in the default workspace with an empty string as its name. |
|
TypedAtomicActor(CompositeEntity container,
java.lang.String name)
Create a new actor in the specified container with the specified name. |
|
TypedAtomicActor(Workspace workspace)
Construct an actor in the specified workspace with an empty string as a name. |
Method Summary | |
---|---|
protected void |
_addPort(Port port)
Override the base class to throw an exception if the added port is not an instance of TypedIOPort. |
protected void |
_fireAt(double time)
Request a firing of this actor at the specified time and throw an exception if the director does not agree to do it at the requested time. |
protected void |
_fireAt(Time time)
Request a firing of this actor at the specified time and throw an exception if the director does not agree to do it at the requested time. |
void |
attributeTypeChanged(Attribute attribute)
React to a change in the type of an attribute. |
java.lang.Object |
clone()
clone() is not supported, call clone(Workspace workspace) instead. |
Port |
newPort(java.lang.String name)
Create a new TypedIOPort with the specified name. |
java.util.List |
typeConstraintList()
Deprecated. Use typeConstraints(). |
java.util.Set<Inequality> |
typeConstraints()
Return the type constraints of this actor. |
Methods inherited from class ptolemy.kernel.ComponentEntity |
---|
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
---|
_description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName |
Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
---|
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ptolemy.actor.Actor |
---|
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList |
Methods inherited from interface ptolemy.actor.Executable |
---|
fire, isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate |
Methods inherited from interface ptolemy.actor.Initializable |
---|
addInitializable, initialize, preinitialize, removeInitializable, wrapup |
Methods inherited from interface ptolemy.kernel.util.Nameable |
---|
description, getContainer, getDisplayName, getFullName, getName, getName, setName |
Methods inherited from interface ptolemy.kernel.util.Derivable |
---|
getDerivedLevel, getDerivedList, propagateValue |
Constructor Detail |
---|
public TypedAtomicActor()
public TypedAtomicActor(Workspace workspace)
workspace
- The workspace that will list the entity.public TypedAtomicActor(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this actor within the container.
IllegalActionException
- If this actor cannot be contained
by the proposed container (see the setContainer() method).
NameDuplicationException
- If the name coincides with
an entity already in the container.Method Detail |
---|
public void attributeTypeChanged(Attribute attribute) throws IllegalActionException
attributeTypeChanged
in class NamedObj
attribute
- The attribute whose type changed.
IllegalActionException
- Not thrown in this base class.
Derived classes can throw this exception if type change is not allowed.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class NamedObj
java.lang.CloneNotSupportedException
- Always thrown.public Port newPort(java.lang.String name) throws NameDuplicationException
newPort
in class AtomicActor
name
- The name for the new port.
NameDuplicationException
- If the actor already has a port
with the specified name.Workspace.getWriteAccess()
public java.util.Set<Inequality> typeConstraints()
typeConstraints
in interface TypedActor
Inequality
public java.util.List typeConstraintList()
Inequality
protected void _addPort(Port port) throws IllegalActionException, NameDuplicationException
_addPort
in class AtomicActor
port
- The port to add to this actor.
IllegalActionException
- If the port is not an instance
of TypedIOPort, or the port has no name.
NameDuplicationException
- If the port name coincides with
the name of another port already in the actor.protected void _fireAt(Time time) throws IllegalActionException
time
- The requested time.
IllegalActionException
- If the director does not
agree to fire the actor at the specified time, or if there
is no director.protected void _fireAt(double time) throws IllegalActionException
time
- The requested time, as a double.
IllegalActionException
- If the director does not
agree to fire the actor at the specified time, or if there is
no director.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |