public abstract class BaseMultipleMethodsActor extends SequencedSharedMemoryActor implements MultipleFireMethodsInterface
Red (cshelton) |
Red (cshelton) |
SequencedSharedMemoryActor.Scope
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_defaultFireMethodName
The number for the default fire method.
|
protected java.lang.String |
_fireMethodName
The string name of the fire method currently being used.
|
protected java.util.Hashtable<java.lang.String,java.util.List<IOPort>> |
_fireMethodNameToInputPortList
The hashtable that maps fire method names to their list of input ports.
|
protected java.util.List<java.lang.String> |
_methodList
The list of method names for the actor.
|
_scope, _sharedName, initialVariableName
delayed, input, output, variableName
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_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 |
---|
BaseMultipleMethodsActor(CompositeEntity container,
java.lang.String name)
Create a new instance of an ASCETClassActor with the given
name and container.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_addFireMethod(java.lang.String methodName,
IOPort outputPort,
java.util.List<IOPort> inputPorts)
Add a fire method for this actor with the specified name.
|
java.lang.String |
getDefaultFireMethodName()
Return the name of the default fire method for this actor.
|
java.util.List<java.lang.String> |
getFireMethodNames()
Return the list of strings that represent the names of
all the fire methods the actor has.
|
java.util.List<IOPort> |
getMethodInputPortList(java.lang.String methodName)
Return the list of input ports associated with the given method name.
|
IOPort |
getMethodOutputPort(java.lang.String methodName)
Return the output port associated with the given method name, if there is one.
|
int |
numFireMethods()
Return the number of fire methods the actor has.
|
void |
setFireMethod(java.lang.String methodName)
Set the fire method to the method that matches the specified
string name.
|
_getDefaultValue, _setValue, _setValue, checkForAttributes, checkForAttributes, fire, getInitialVariable, getInitialVariableName, getModifiedVariable, getModifiedVariable, getSharedName, getVariable, getVariableName, preinitialize, setName
_customTypeConstraints, changeExecuted, changeFailed, clone, getContext, getModifiedVariables, postfire
_containedTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, initialize, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, prefire, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, decorators, deepContains, 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, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
description, getContainer, getDisplayName, getFullName, getName, getName
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, prefire, stop, stopFire, terminate
addInitializable, initialize, removeInitializable, wrapup
getDerivedLevel, getDerivedList, propagateValue
protected java.lang.String _defaultFireMethodName
protected java.util.List<java.lang.String> _methodList
protected java.lang.String _fireMethodName
protected java.util.Hashtable<java.lang.String,java.util.List<IOPort>> _fireMethodNameToInputPortList
public BaseMultipleMethodsActor(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The model in which the new actor will be contained.name
- The name of the new actorIllegalActionException
- If the new actor cannot be created.NameDuplicationException
- If there is already a NamedObj with
the same name in the container model.public java.lang.String getDefaultFireMethodName()
getDefaultFireMethodName
in interface MultipleFireMethodsInterface
public java.util.List<java.lang.String> getFireMethodNames()
getFireMethodNames
in interface MultipleFireMethodsInterface
public java.util.List<IOPort> getMethodInputPortList(java.lang.String methodName)
getMethodInputPortList
in interface MultipleFireMethodsInterface
methodName
- The specified method name.public IOPort getMethodOutputPort(java.lang.String methodName)
getMethodOutputPort
in interface MultipleFireMethodsInterface
methodName
- The specified name of the method.public int numFireMethods()
numFireMethods
in interface MultipleFireMethodsInterface
public void setFireMethod(java.lang.String methodName) throws IllegalActionException
setFireMethod
in interface MultipleFireMethodsInterface
methodName
- The name of the method to be used.IllegalActionException
- If the specified fire method cannot be found
in the actor.protected void _addFireMethod(java.lang.String methodName, IOPort outputPort, java.util.List<IOPort> inputPorts) throws IllegalActionException, NameDuplicationException
methodName
- The name of the fire method to be added.outputPort
- The output port associated with this method, or null if
there is none.inputPorts
- The list of input ports associated with this method, or null
if there are none.IllegalActionException
- If a the method specifies an output port or input
ports already associated with another fire method.NameDuplicationException
- If there is already another method with the same
name specified for this actor.