public class ModularCodeGenTypedCompositeActor extends ModularCodeGenLazyTypedCompositeActor
Red (rodiers) |
Red (rodiers) |
LazyTypedCompositeActor.ContainedObjectsIterator
_addedSubscribersFromProfile, _creatingPubSub, _fireMethod, _generatingCode, _objectWrapper, _profile, _subscriberPorts, recompileHierarchy, recompileThisLevel
_configureDone, _populating
_actorFiringListeners, _causalityInterface, _derivedPiggybacks, _initializables, _notifyingActorFiring, _piggybacks, _publishedPorts, _publisherRelations, _stopRequested, _subscribedPorts
_levelCrossingLinks
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
ModularCodeGenTypedCompositeActor()
Construct a library in the default workspace with no container
and an empty string as its name.
|
ModularCodeGenTypedCompositeActor(CompositeEntity container,
java.lang.String name)
Construct a library with the given container and name.
|
ModularCodeGenTypedCompositeActor(Workspace workspace)
Construct a library in the specified workspace with no
container and an empty string as a name.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
_isPublishedPort(IOPort port)
Return true if the port is a is connected to a publisher.
|
protected java.lang.String |
_pubSubChannelName(IOPort port,
boolean publisher,
boolean subscriber)
Return the name of a Publisher or Subscriber channel name.
|
void |
attributeChanged(Attribute attribute)
React to a change in an attribute.
|
void |
fire()
If this actor is opaque, transfer any data from the input ports
of this composite to the ports connected on the inside, and then
invoke the fire() method of its local director.
|
void |
initialize()
Create receivers and invoke the preinitialize() method of the
local director.
|
java.util.List |
portList()
Get the ports belonging to this entity.
|
void |
preinitialize()
Create receivers and invoke the preinitialize() method of the
local director.
|
void |
registerPublisherPort(java.lang.String name,
IOPort port)
Register a "published port" coming from a publisher.
|
void |
wrapup()
Invoke the wrapup() method of all the actors contained in the
director's container.
|
_addEntity, _addRelation, _fire, _isSubscribedPort, _removeEntity, _removeRelation, _setRecompileFlag, _transferOutputs, classToActorName, convertProfilePort, newRelation
_exportMoMLContents, classDefinitionList, clone, configure, deepContains, deepEntityList, deepOpaqueEntityList, deepRelationSet, entityList, entityList, exportMoML, getConfigureSource, getConfigureText, getEntity, getRelation, lazyAllAtomicEntityList, lazyAllCompositeEntityList, lazyClassDefinitionList, lazyContainedObjectsIterator, lazyDeepEntityList, lazyEntityList, lazyRelationList, numberOfEntities, numberOfRelations, populate, relationList, setClassDefinition, uniqueName
_addPort, _checkTypesFromTo, _destinationTypeConstraints, attributeTypeChanged, isBackwardTypeInferenceEnabled, newPort, resolveTypes, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _finishedAddEntity, _setDirector, _transferPortParameterInputs, addActorFiringListener, addInitializable, addPiggyback, connectionsChanged, createReceivers, createSchedule, getCausalityInterface, getDirector, getExecutiveDirector, getManager, getPublishedPort, getPublishedPortChannel, getPublishedPorts, getSubscribedPortChannel, inferringWidths, inferWidths, inputPortList, isFireFunctional, isOpaque, isPublishedPort, isStrict, iterate, linkToPublishedPort, linkToPublishedPort, linkToPublishedPort, linkToPublishedPort, needsWidthInference, newInsideReceiver, newReceiver, notifyConnectivityChange, outputPortList, postfire, prefire, recordFiring, registerPublisherPort, removeActorFiringListener, removeInitializable, removePiggyback, requestChange, setContainer, setDirector, setManager, stop, stopFire, terminate, unlinkToPublishedPort, unlinkToPublishedPort, unlinkToPublishedPort, unlinkToPublishedPort, unregisterPublisherPort, unregisterPublisherPort
_adjustDeferrals, _containedDecorators, _deepOpaqueEntityList, _description, _validateSettables, allAtomicEntityList, allowLevelCrossingConnect, connect, connect, containedObjectsIterator, deepCompositeEntityList, deepGetEntities, deepNamedObjList, exportLinks, getAttribute, getEntities, getPort, getRelations, isAtomic, lazyAllCompositeTransparentAndOpaqueEntityList, numEntities, numRelations, removeAllEntities, removeAllRelations, statistics
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_removePort, connectedPortList, connectedPorts, getPorts, linkedRelationList, linkedRelations, removeAllPorts
_setParent, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, clone, decorators, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
addInitializable, removeInitializable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public ModularCodeGenTypedCompositeActor() throws IllegalActionException, NameDuplicationException
IllegalActionException
- If the entity cannot be contained
by the proposed container.NameDuplicationException
- If the container already has an
actor with this name.public ModularCodeGenTypedCompositeActor(Workspace workspace) throws IllegalActionException, NameDuplicationException
workspace
- The workspace that will list the actor.IllegalActionException
- If the entity cannot be contained
by the proposed container.NameDuplicationException
- If the container already has an
actor with this name.public ModularCodeGenTypedCompositeActor(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
container
- The container.name
- The name of this library.IllegalActionException
- If the entity cannot be contained
by the proposed container.NameDuplicationException
- If the container already has an
actor with this name.public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class TypedCompositeActor
attribute
- The attribute that changed.IllegalActionException
- If the change is not acceptable
to this container.public java.util.List portList()
public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class CompositeActor
IllegalActionException
- If there is no director, or if
the director's fire() method throws it, or if the actor is not
opaque.public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class CompositeActor
IllegalActionException
- If there is no director, or
if the director's preinitialize() method throws it, or if
this actor is not opaque.public void preinitialize() throws IllegalActionException
preinitialize
in interface Initializable
preinitialize
in class CompositeActor
IllegalActionException
- If there is no director, or if
the director's preinitialize() method throws it, or if this actor
is not opaque.public void registerPublisherPort(java.lang.String name, IOPort port) throws NameDuplicationException, IllegalActionException
registerPublisherPort
in class CompositeActor
name
- The name is being used in the matching process
to match publisher and subscriber.port
- The published port.NameDuplicationException
- If the published port
is already registered.IllegalActionException
- If the published port can't
be added.public void wrapup() throws IllegalActionException
This method should be invoked once per execution. None of the other action methods should be invoked after it in the execution. This method is not synchronized on the workspace, so the caller should be.
wrapup
in interface Initializable
wrapup
in class CompositeActor
IllegalActionException
- If the wrapup() method of
one of the associated actors throws it.protected boolean _isPublishedPort(IOPort port)
_isPublishedPort
in class ModularCodeGenLazyTypedCompositeActor
port
- The port to look up.protected java.lang.String _pubSubChannelName(IOPort port, boolean publisher, boolean subscriber)
_pubSubChannelName
in class ModularCodeGenLazyTypedCompositeActor
port
- The port.publisher
- True if the corresponding Publisher should
be returned.subscriber
- True if the corresponding Subscriber should
be returned.