javawrapper::Interface Class Reference

Interface between the Java GUI and the C++ application core. More...

List of all members.

Public Member Functions

void Pause () throws ModelException
 Pauses the run by sending a "pause" command to the process.
void Stop () throws ModelException
 Stops the currently executing process.
void Run (final MainWindow oWindow, final String sFileName, final int iNumStepsToRun)
 Runs the model.
String GetMessage ()
 Gets any message waiting in the queue from the model run.
boolean IsDone ()
 Gets whether or not the currently executing model run is finished.
boolean IsPaused ()
 Gets whether or not there is a current run that is paused.
void KillProcess ()
 Hard-kills any currently running model process.
boolean IsOK ()
 Gets whether or not the last executed model run finished without errors.


Detailed Description

Interface between the Java GUI and the C++ application core.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Institute of Ecosystem Studies

Author:
Lora E. Murphy
Version:
1.0

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
November 8, 2004: Put in pause and stop buttons (LEM)


Member Function Documentation

void javawrapper::Interface::Pause (  )  throws ModelException [inline]

Pauses the run by sending a "pause" command to the process.

Exceptions:
ModelException if the process could not be written to.

void javawrapper::Interface::Stop (  )  throws ModelException [inline]

Stops the currently executing process.

If the run is currently paused, the command "quit" will be sent to the process's stdin stream. If the run is currently running, the messages file will be created with a "q" in the first position.

Exceptions:
ModelException if there are problems writing to the file or to the process.

void javawrapper::Interface::Run ( final MainWindow  oWindow,
final String  sFileName,
final int  iNumStepsToRun 
) [inline]

Runs the model.

This launches the executable and passes in the user's chosen file. This function will display any errors that occurred.

Parameters:
oWindow MainWindow, for displaying messages.
sFileName String Filename to run.
iNumStepsToRun Number of timesteps to run. Set to 0 if the model is to run to conclusion.

String javawrapper::Interface::GetMessage (  )  [inline]

Gets any message waiting in the queue from the model run.

This will erase the message after sending it to ensure that messages can be uniquely identified.

Returns:
String The last message sent from the C++ program.

boolean javawrapper::Interface::IsDone (  )  [inline]

Gets whether or not the currently executing model run is finished.

Returns:
boolean True if complete, false if still executing.

boolean javawrapper::Interface::IsPaused (  )  [inline]

Gets whether or not there is a current run that is paused.

Returns:
boolean True if there is a paused in-progress run, false otherwise.

boolean javawrapper::Interface::IsOK (  )  [inline]

Gets whether or not the last executed model run finished without errors.

Returns:
boolean True if it finished without errors, false otherwise.


The documentation for this class was generated from the following file:
Generated on Thu May 24 09:34:54 2007 for SORTIE Java Interface by  doxygen 1.5.2