hicosim.components.backend.io
Class CommandScanner

java.lang.Object
  extended by hicosim.components.backend.io.CommandScanner

public class CommandScanner
extends java.lang.Object

This class is used by the CommandProcessor to scan the Strings comming from the console or the GUI-console.

Author:
Michael Wager, 16th May 2009

Constructor Summary
CommandScanner(Engine engine)
          Set up a Buffered Reader.
 
Method Summary
 Command scanline(java.lang.String cmd, boolean gui)
          Scan a line and check command SCAN A LINE FROM STDIN OR, IF GUI=TRUE FROM GUI.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandScanner

public CommandScanner(Engine engine)
Set up a Buffered Reader.

Method Detail

scanline

public Command scanline(java.lang.String cmd,
                        boolean gui)
                 throws java.lang.Exception
Scan a line and check command SCAN A LINE FROM STDIN OR, IF GUI=TRUE FROM GUI. --> USED BY CommandProcessor for commandline commands, or by GUI for gui-commands

Returns:
Command - see enum Command
Throws:
java.lang.Exception