public class TypedCompositeActor extends TypedCompositeActor
Red (zgang) |
Yellow (cxh) |
NamedProgramCodeGeneratorAdapter.VariableScope
ProgramCodeGeneratorAdapter.Channel
NamedObj.ContainedObjectsIterator
_component, _defaultBlocks, _eol, _templateParser
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
TypedCompositeActor(TypedCompositeActor component)
Construct the code generator adapter associated
with the given TypedCompositeActor.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
_generateFireCode()
Generate the fire code of the associated composite actor.
|
void |
analyzeTypeConvert()
For each actor in this typed composite actor, determine which ports
need type conversion.
|
java.lang.String |
generateFireFunctionCode()
Generate The fire function code.
|
java.lang.String |
generateInitializeCode()
Generate the initialize code of the associated composite actor.
|
void |
generateModeTransitionCode(java.lang.StringBuffer code)
Generate mode transition code.
|
java.lang.String |
generatePostfireCode()
Generate the postfire code of the associated composite
actor.
|
java.lang.String |
generateVariableDeclaration()
Generate variable declarations for input ports, output ports and
parameters if necessary, as well as for the director and the
contained actors.
|
java.lang.String |
generateVariableInitialization()
Generate variable initialization for the referenced parameters.
|
java.lang.String |
generateWrapupCode()
Generate the wrapup code of the associated composite actor.
|
java.util.Set<java.lang.String> |
getDeclareSharedCode()
Generate a set of declaration shared code fragments of the associated
composite actor.
|
java.util.Set<java.lang.String> |
getHeaderFiles()
Get the header files needed by the code generated from this adapter
class.
|
java.util.Set<java.lang.String> |
getIncludeDirectories()
Return the include directories specified in the "includeDirectories"
blocks in the templates of the actors included in this CompositeActor.
|
java.util.Set<java.lang.String> |
getLibraries()
Return the libraries specified in the "libraries" blocks in the
templates of the actors included in this CompositeActor.
|
java.util.Set<java.lang.String> |
getLibraryDirectories()
Return the libraries specified in the "libraryDirectories" blocks in the
templates of the actors included in this CompositeActor.
|
java.util.Set<Parameter> |
getModifiedVariables()
Return a set of parameters that will be modified during the
execution of the model.
|
java.util.Set<java.lang.String> |
getSharedCode()
Generate a set of shared code fragments of the associated
composite actor.
|
void |
setupAdapter()
Set up adapters contained by the composite actor.
|
generatePreinitializeCode, generatePreinitializeMethodBodyCode
_generateTypeConvertStatement, copyFilesToCodeDirectory, generateFireCode, generateMainLoop, generatePrefireCode, generateSimpleName, generateTypeConvertFireCode, generateTypeConvertFireCode, getAddTimeString, getBufferSize, getBufferSize, getComponent, getDefaultBlocks, getFireFunctionParameters, getName, getParameterValue, getReference, getReference, getSinkChannels, getSourceTimeString, getTimeSourcePortName, getTypeConvertChannels, getTypeConvertReference, getTypeConvertSinkChannels, targetType
_generateBlockByName, getAdapter, getCodeGenerator, getTemplateParser, processCode, setCodeGenerator, setTemplateParser, toString
createDecoratorAttributes, generateName
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getContainedObject, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateExistence, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getContainer, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setName, setPersistent, setSource, sortContainedObjects, toplevel, uniqueName, validateSettables, workspace
public TypedCompositeActor(TypedCompositeActor component)
component
- The associated component.public void analyzeTypeConvert() throws IllegalActionException
analyzeTypeConvert
in class NamedProgramCodeGeneratorAdapter
IllegalActionException
- If any of the adapters of the
inside actors is unavailable.NamedProgramCodeGeneratorAdapter.analyzeTypeConvert()
public java.lang.String generateFireFunctionCode() throws IllegalActionException
generateFireFunctionCode
in class NamedProgramCodeGeneratorAdapter
IllegalActionException
- If thrown while generating fire code.public java.lang.String generateInitializeCode() throws IllegalActionException
generateInitializeCode
in class TypedCompositeActor
IllegalActionException
- If the adapter associated with
an actor throws it while generating initialize code for the actor
or while resetting read and write offset.public void generateModeTransitionCode(java.lang.StringBuffer code) throws IllegalActionException
generateModeTransitionCode
in class NamedProgramCodeGeneratorAdapter
code
- The string buffer that the generated code is appended to.IllegalActionException
- If the director adapter throws it
while generating mode transition code.public java.lang.String generatePostfireCode() throws IllegalActionException
generatePostfireCode
in class NamedProgramCodeGeneratorAdapter
IllegalActionException
- If the adapter associated with
an actor throws it while generating postfire code for the actor.public java.lang.String generateVariableDeclaration() throws IllegalActionException
generateVariableDeclaration
in class NamedProgramCodeGeneratorAdapter
IllegalActionException
- If the adapter associated with
an actor throws it while generating variable declarations for
the actor.public java.lang.String generateVariableInitialization() throws IllegalActionException
generateVariableInitialization
in class NamedProgramCodeGeneratorAdapter
IllegalActionException
- If the adapter associated with
an actor throws it while generating variable declarations for
the actor.public java.lang.String generateWrapupCode() throws IllegalActionException
generateWrapupCode
in class TypedCompositeActor
IllegalActionException
- If the adapter associated with
an actor throws it while generating wrapup code for the actor.public java.util.Set<java.lang.String> getHeaderFiles() throws IllegalActionException
getHeaderFiles
in class NamedProgramCodeGeneratorAdapter
IllegalActionException
- If the adapter associated with
an actor throws it while generating header files for the actor.public java.util.Set<java.lang.String> getIncludeDirectories() throws IllegalActionException
getIncludeDirectories
in class NamedProgramCodeGeneratorAdapter
IllegalActionException
- If thrown when gathering
include directories.public java.util.Set<java.lang.String> getLibraries() throws IllegalActionException
getLibraries
in class NamedProgramCodeGeneratorAdapter
IllegalActionException
- If thrown when gathering libraries.public java.util.Set<java.lang.String> getLibraryDirectories() throws IllegalActionException
getLibraryDirectories
in class NamedProgramCodeGeneratorAdapter
IllegalActionException
- If thrown when gathering libraries.public java.util.Set<Parameter> getModifiedVariables() throws IllegalActionException
getModifiedVariables
in class NamedProgramCodeGeneratorAdapter
IllegalActionException
- If the adapter associated with an actor
or director throws it while getting modified variables.public java.util.Set<java.lang.String> getDeclareSharedCode() throws IllegalActionException
getDeclareSharedCode
in class NamedProgramCodeGeneratorAdapter
IllegalActionException
- If the adapter associated with
an actor throws it while generating shared code for the actor.public java.util.Set<java.lang.String> getSharedCode() throws IllegalActionException
getSharedCode
in class TypedCompositeActor
IllegalActionException
- If the adapter associated with
an actor throws it while generating shared code for the actor.public void setupAdapter() throws IllegalActionException
setupAdapter
in class NamedProgramCodeGeneratorAdapter
IllegalActionException
- If the adapter associated with
an actor throws it while being set up.protected java.lang.String _generateFireCode() throws IllegalActionException
_generateFireCode
in class TypedCompositeActor
IllegalActionException
- If the adapter associated
with an actor throws it while generating fire code for the
actor, or the director adapter throws it while generating code
for transferring data.