Package ptolemy.domains.tdl.kernel
Class TDLCodeGenerator
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.domains.tdl.kernel.TDLCodeGenerator
-
- All Implemented Interfaces:
java.lang.Cloneable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class TDLCodeGenerator extends Attribute
Generates the TDL code for a given TDL module.- Since:
- Ptolemy II 8.0
- Version:
- $Id$
- Author:
- Patricia Derler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
TDLCodeGenerator.TDLEditorFactory
An attribute that can create an TDL code editor for a TDL model.-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
-
Constructor Summary
Constructors Constructor Description TDLCodeGenerator()
Construct a factory with the default workspace and "" as name.TDLCodeGenerator(NamedObj container, java.lang.String name)
Construct a factory with the specified container and name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_instantiateEditorFactoryClass()
Method to instantiate the Editor Factory class called from the constructor.java.lang.String
generateTDLCode(TypedCompositeActor model)
Generate TDL code for the given TDL model.-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
-
-
-
-
Constructor Detail
-
TDLCodeGenerator
public TDLCodeGenerator() throws IllegalActionException, NameDuplicationException
Construct a factory with the default workspace and "" as name.- Throws:
IllegalActionException
- If the factory is not of an acceptable attribute for the container.NameDuplicationException
- If the name coincides with an attribute already in the container.
-
TDLCodeGenerator
public TDLCodeGenerator(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct a factory with the specified container and name.- Parameters:
container
- The container.name
- The name of the factory.- Throws:
IllegalActionException
- If the factory is not of an acceptable attribute for the container.NameDuplicationException
- If the name coincides with an attribute already in the container.
-
-
Method Detail
-
generateTDLCode
public java.lang.String generateTDLCode(TypedCompositeActor model) throws IllegalActionException
Generate TDL code for the given TDL model.- Parameters:
model
- The given TDL model.- Returns:
- The TDL code.
- Throws:
IllegalActionException
- If code can not be generated.
-
_instantiateEditorFactoryClass
protected void _instantiateEditorFactoryClass() throws IllegalActionException, NameDuplicationException
Method to instantiate the Editor Factory class called from the constructor. The reason for having this is that it can be overridden by subclasses- Throws:
IllegalActionException
- If the editor factory can not be created.NameDuplicationException
- If there is already another editor factory with the same name.
-
-