|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.copernicus.java.CommandLineTemplate
public class CommandLineTemplate
This class is similar to CompositeActorApplication, except that it does not parse command line elements. It is used as a template for generating a command line interface for code generated from a ptolemy model.
In this case, parsing the command line is not necessary because parameter values and the class values are fixed by the code generator.
Red (vogel) |
Yellow (cxh) |
Field Summary | |
---|---|
protected int |
_iterationLimit
|
protected java.util.List |
_models
The list of all the models |
protected int |
_openCount
The count of currently open windows. |
protected static long |
_parseStartTime
The time that creating the model started |
protected static boolean |
_test
Are we testing? |
Constructor Summary | |
---|---|
CommandLineTemplate()
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
Create a new application with the specified command-line arguments. |
void |
processArgs(java.lang.String[] args)
Parse the command-line arguments, creating models as specified. |
void |
report(java.lang.Exception ex)
Report an exception. |
void |
report(java.lang.String message)
Report a message to the user. |
void |
report(java.lang.String message,
java.lang.Exception ex)
Report an exception with an additional message. |
void |
startRun(CompositeActor model)
If the specified model has a manager and is not already running, then execute the model in a new thread. |
void |
stopRun(CompositeActor model)
If the specified model has a manager and is executing, then stop execution by calling the finish() method of the manager. |
static java.lang.String |
timeAndMemory(long startTime)
|
static java.lang.String |
timeAndMemory(long startTime,
long totalMemory,
long freeMemory)
|
static void |
timeAndMemory(long startTime,
long totalMemory,
long freeMemory,
java.lang.StringBuffer buffer)
|
void |
waitForFinish()
Wait for all windows to close. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int _iterationLimit
protected java.util.List _models
protected int _openCount
protected static boolean _test
protected static long _parseStartTime
Constructor Detail |
---|
public CommandLineTemplate()
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- The command-line arguments.public void processArgs(java.lang.String[] args) throws java.lang.Exception
args
- The command-line arguments.
java.lang.Exception
- If there is a problem processing
the arguments.public void report(java.lang.Exception ex)
ex
- The exception to report.public void report(java.lang.String message)
message
- The message to report.public void report(java.lang.String message, java.lang.Exception ex)
message
- The message.ex
- The exception to report.public void startRun(CompositeActor model)
We then start the model running.
model
- The model to execute.Manager.startRun()
public static java.lang.String timeAndMemory(long startTime)
public static java.lang.String timeAndMemory(long startTime, long totalMemory, long freeMemory)
public static void timeAndMemory(long startTime, long totalMemory, long freeMemory, java.lang.StringBuffer buffer)
public void stopRun(CompositeActor model)
model
- The model to stop.public void waitForFinish()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |