|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.domains.giotto.kernel.GiottoCodeGenerator
This attribute is a visible attribute that when configured (by double clicking on it or by invoking Configure in the context menu) it generates Giotto code and displays it a text editor. It is up to the user to save the Giotto code in an appropriate file, if necessary.
| Red (johnr) |
| Red (eal) |
| Nested Class Summary | |
protected class |
GiottoCodeGenerator.GiottoEditorFactory
|
| Nested classes inherited from class ptolemy.kernel.util.NamedObj |
NamedObj.ContainedObjectsIterator |
| Field Summary | |
protected java.lang.String |
_endLine
|
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Constructor Summary | |
GiottoCodeGenerator()
Construct a factory with the default workspace and "" as name. |
|
GiottoCodeGenerator(NamedObj container,
java.lang.String name)
Construct a factory with the specified container and name. |
|
| Method Summary | |
protected java.lang.String |
_actuatorCode(TypedCompositeActor model)
Generate code for the actuator. |
protected void |
_checkGiottoID(java.lang.String string)
Throw an exception if the given string is a valid giotto reserved word, which prevents it from being used as an identifier. |
protected java.lang.String |
_driverCode(TypedCompositeActor model,
Actor actor)
Generate code for the driver. |
protected java.lang.String |
_driversCode(TypedCompositeActor model)
Generate code for the drivers. |
protected java.lang.String |
_getTypeString(TypedIOPort port)
Return the correct Giotto type string for the given port. |
protected boolean |
_initialize(TypedCompositeActor model)
Topology analysis and initialization. |
protected void |
_instantiateEditorFactoryClass()
Method to instantiate the Editor Factory class called from the constructor. |
protected java.lang.String |
_modeCode(TypedCompositeActor model)
Generate code for the modes. |
protected boolean |
_needsInputDriver(Actor actor)
Return true if the given actor has at least one connected input port, which requires it to have an input driver. |
protected java.lang.String |
_outputCode(TypedCompositeActor model)
Generate code for the output ports. |
protected java.lang.String |
_sensorCode(TypedCompositeActor model)
Generate code for the sensors. |
protected java.lang.String |
_taskCode(TypedCompositeActor model,
Actor actor)
Generate code for the task. |
protected java.lang.String |
_tasksCode(TypedCompositeActor model)
Generate code for the tasks. |
java.lang.String |
generateGiottoCode(TypedCompositeActor model)
Generate Giotto code for the given model. |
| Methods inherited from class ptolemy.kernel.util.Attribute |
_getContainedObject, _propagateExistence, clone, getContainer, setContainer, setName |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String _endLine
| Constructor Detail |
public GiottoCodeGenerator()
throws IllegalActionException,
NameDuplicationException
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.
public GiottoCodeGenerator(NamedObj container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
container - The container.name - The name of the factory.
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 |
public java.lang.String generateGiottoCode(TypedCompositeActor model)
throws IllegalActionException
IllegalActionException
protected void _instantiateEditorFactoryClass()
throws IllegalActionException,
NameDuplicationException
IllegalActionException
NameDuplicationException
protected void _checkGiottoID(java.lang.String string)
throws IllegalActionException
IllegalActionExceptionprotected java.lang.String _getTypeString(TypedIOPort port)
protected boolean _initialize(TypedCompositeActor model)
throws IllegalActionException
IllegalActionException
protected java.lang.String _sensorCode(TypedCompositeActor model)
throws IllegalActionException
IllegalActionException
protected java.lang.String _actuatorCode(TypedCompositeActor model)
throws IllegalActionException
IllegalActionException
protected java.lang.String _outputCode(TypedCompositeActor model)
throws IllegalActionException
IllegalActionException
protected java.lang.String _taskCode(TypedCompositeActor model,
Actor actor)
throws IllegalActionException
IllegalActionException
protected java.lang.String _tasksCode(TypedCompositeActor model)
throws IllegalActionException
IllegalActionException
protected java.lang.String _driverCode(TypedCompositeActor model,
Actor actor)
throws IllegalActionException
IllegalActionException
protected java.lang.String _driversCode(TypedCompositeActor model)
throws IllegalActionException
IllegalActionException
protected java.lang.String _modeCode(TypedCompositeActor model)
throws IllegalActionException
IllegalActionExceptionprotected boolean _needsInputDriver(Actor actor)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||