|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectptolemy.moml.ConvertToLazy
public class ConvertToLazy
Read a specified MoML file and convert all instances of TypedCompositeActor that contain more than a specified number of entities to LazyTypedCompositeActor. The converted model's MoML is produced on standard out. To use this on the command line, invoke as follows:
$PTII/bin/convertToLazy inputMoML.xml numberOfEntities > outputMoML.xml
or
java -classpath $PTII ptolemy.moml.ConvertToLazy inputMoML.xml numberOfEntities > outputMoML.xml
If the numberOfEntities argument is not supplied, then it
defaults to 100.
| Red (eal) |
| Red (cxh) |
| Constructor Summary | |
|---|---|
ConvertToLazy(java.lang.String xmlFileName,
int threshold)
Parse the xml file and convert it. |
|
| Method Summary | |
|---|---|
void |
changeExecuted(ChangeRequest change)
React to a change request has been successfully executed by doing nothing. |
void |
changeFailed(ChangeRequest change,
java.lang.Exception exception)
React to a change request that has resulted in an exception. |
void |
convert(TypedCompositeActor actor,
int threshold)
Convert the model. |
int |
count(TypedCompositeActor actor)
Count the number of contained entities that have not already been made lazy. |
static void |
main(java.lang.String[] args)
Create an instance of a model and convert it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConvertToLazy(java.lang.String xmlFileName,
int threshold)
throws java.lang.Throwable
xmlFileName - A string that refers to an MoML file that
contains a Ptolemy II model. The string should be
a relative pathname.threshold - The number of contained entities that a composite
should have to be converted to a lazy composite.
java.lang.Throwable - If there was a problem parsing
or running the model.| Method Detail |
|---|
public void changeExecuted(ChangeRequest change)
changeExecuted in interface ChangeListenerchange - The change that has been executed, or null if
the change was not done via a ChangeRequest.
public void changeFailed(ChangeRequest change,
java.lang.Exception exception)
changeFailed in interface ChangeListenerchange - The change that was attempted or null if
the change was not done via a ChangeRequest.exception - The exception that resulted.
public void convert(TypedCompositeActor actor,
int threshold)
actor - The model to convert.threshold - The threshold to use.public int count(TypedCompositeActor actor)
actor - The actor to count.
public static void main(java.lang.String[] args)
args - The command-line arguments providing the number
of entities threshold and naming the .xml file to convert.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||