|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.kernel.CompositeEntity
ptolemy.actor.CompositeActor
ptolemy.actor.TypedCompositeActor
ptolemy.actor.lib.hoc.MirrorComposite
public class MirrorComposite
This is a base class for actors that are simple composites that contain one actor and mirror the ports and parameters of that one actor.
Red (neuendor) |
Yellow (eal) |
Nested Class Summary | |
---|---|
static class |
MirrorComposite.MirrorCompositeContents
This is a specialized composite actor for use in MirrorComposite. |
Nested classes/interfaces inherited from class ptolemy.kernel.CompositeEntity |
---|
CompositeEntity.ContainedObjectsIterator |
Field Summary | |
---|---|
private boolean |
_inAddPort
Flag indicating that we are executing _addPort(). |
private boolean |
_inRemoveEntity
Flag indicating that we are executing _removeEntity(). |
private boolean |
_mirrorParameterPorts
Flag indicating whether to mirror instances of ParameterPort. |
Fields inherited from class ptolemy.actor.CompositeActor |
---|
_actorFiringListeners, _causalityInterface, _initializables, _notifyingActorFiring, _publishedPorts, _publisherRelations, _stopRequested |
Fields inherited from class ptolemy.kernel.CompositeEntity |
---|
_levelCrossingLinks |
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 | |
---|---|
MirrorComposite(CompositeEntity container,
java.lang.String name)
Create an actor with a name and a container. |
|
MirrorComposite(CompositeEntity container,
java.lang.String name,
boolean mirrorParameterPorts)
Create an actor with a name and a container that optionally mirrors the ports that are instances of ParameterPort. |
|
MirrorComposite(Workspace workspace)
Construct a MirrorComposite in the specified workspace with no container and an empty string as a name. |
Method Summary | |
---|---|
protected void |
_addEntity(ComponentEntity entity)
Override the base class to queue a change request to remove any previously contained entity and its mirrored ports, and to mirror the ports of the added entity. |
protected void |
_addPort(Port port)
Add a port to this actor. |
protected void |
_exportMoMLContents(java.io.Writer output,
int depth)
Override the base class to describe contained entities, attributes, and ports, but not inside links or relations. |
private void |
_init(boolean mirrorParameterPorts)
Initialize the class. |
protected void |
_removeEntity(ComponentEntity entity)
Override the base class to remove the ports and inside relations of this actor. |
protected void |
_removePort(Port port)
Override the base class to remove the associated port on the inside entity and the link to it, if there is one. |
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace. |
Port |
newPort(java.lang.String name)
Override the base class to return a specialized port. |
Methods inherited from class ptolemy.actor.TypedCompositeActor |
---|
_addRelation, _checkTypesFromTo, _typeConstraintsFromTo, newRelation, resolveTypes, typeConstraintList, typeConstraints |
Methods inherited from class ptolemy.kernel.ComponentEntity |
---|
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
---|
connectedPortList, connectedPorts, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts |
Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
---|
_setParent, 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 |
Field Detail |
---|
private boolean _inAddPort
private boolean _inRemoveEntity
private boolean _mirrorParameterPorts
Constructor Detail |
---|
public MirrorComposite(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container actor.name
- The name of this actor.
IllegalActionException
- If the container is incompatible
with this actor.
NameDuplicationException
- If the name coincides with
an actor already in the container.public MirrorComposite(Workspace workspace)
workspace
- The workspace that will list the actor.public MirrorComposite(CompositeEntity container, java.lang.String name, boolean mirrorParameterPorts) throws IllegalActionException, NameDuplicationException
container
- The container actor.name
- The name of this actor.mirrorParameterPorts
- If false, then ports that are instances of
ParameterPort are not mirrored.
IllegalActionException
- If the container is incompatible
with this actor.
NameDuplicationException
- If the name coincides with
an actor already in the container.Method Detail |
---|
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class CompositeActor
workspace
- The workspace for the new object.
java.lang.CloneNotSupportedException
- If any of the attributes
cannot be cloned.CompositeEntity.exportMoML(Writer, int, String)
public Port newPort(java.lang.String name) throws NameDuplicationException
newPort
in class TypedCompositeActor
name
- The name of the port to create.
NameDuplicationException
- If the container already has a port
with this name.protected void _addEntity(ComponentEntity entity) throws IllegalActionException, NameDuplicationException
_addEntity
in class TypedCompositeActor
entity
- Entity to contain.
IllegalActionException
- If the entity has no name, or the
action would result in a recursive containment structure, or the
argument does not implement the TypedActor interface.
NameDuplicationException
- If the name collides with a name
already on the actor contents list, or if the added element is a
class definition.protected void _addPort(Port port) throws IllegalActionException, NameDuplicationException
_addPort
in class TypedCompositeActor
port
- The TypedIOPort to add to this actor.
IllegalActionException
- If the port is not an instance
of IteratePort, or the port has no name.
NameDuplicationException
- If the port name collides with a
name already in the actor.protected void _exportMoMLContents(java.io.Writer output, int depth) throws java.io.IOException
_exportMoMLContents
in class CompositeEntity
output
- The output to write to.depth
- The depth in the hierarchy, to determine indenting.
java.io.IOException
- If an I/O error occurs.NamedObj.exportMoML(Writer, int)
protected void _removeEntity(ComponentEntity entity)
_removeEntity
in class CompositeEntity
entity
- The entity being removed from this entity.protected void _removePort(Port port)
_removePort
in class Entity
port
- The port being removed from this entity.private void _init(boolean mirrorParameterPorts)
mirrorParameterPorts
- If true, then mirror instances of ParameterPort.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |