Class DefaultCommandParser
java.lang.Object
|
+--CommandParser
|
+--DefaultCommandParser
- public class DefaultCommandParser
- extends CommandParser
A class to encapsulate the functionality required to properly parse a
simulation file in order to simulate the robot's actions. This particular
implementation parses files according to the SCORBASE-type definition. The
implementation of this class needs to be cleaned up.
Constructor Summary |
protected |
DefaultCommandParser()
The default constructor which retreives the language properties, fills
the resource table, and initializes the class variables. |
Method Summary |
CommandQueue |
getCommandQueue()
Returns the CommandQueue of the command file. |
java.util.Hashtable |
getNameTable()
Gets the Hashtable of valid names for the Robot. |
void |
loadSimulation(java.io.Reader reader)
Loads the simulation file by reading from the specified Reader. |
void |
setNameTable(java.util.Hashtable theNameTable)
Sets the Hashtable of valid names for the Robot. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DefaultCommandParser
protected DefaultCommandParser()
- The default constructor which retreives the language properties, fills
the resource table, and initializes the class variables.
getCommandQueue
public CommandQueue getCommandQueue()
- Returns the CommandQueue of the command file.
- Returns:
- the CommandQueue object of parsed Commands.
- Overrides:
- getCommandQueue in class CommandParser
setNameTable
public void setNameTable(java.util.Hashtable theNameTable)
- Sets the Hashtable of valid names for the Robot.
- Parameters:
theNameTable
- the Hashtable of name for the Robot's joints.- Overrides:
- setNameTable in class CommandParser
getNameTable
public java.util.Hashtable getNameTable()
- Gets the Hashtable of valid names for the Robot.
- Returns:
- the Hashtable of names for the Robot's joints.
- Overrides:
- getNameTable in class CommandParser
loadSimulation
public void loadSimulation(java.io.Reader reader)
throws CommandParserException
- Loads the simulation file by reading from the specified Reader.
- Parameters:
reader
- the Reader stream for simulation.- Throws:
- CommandParserException - thrown is cases of I/O error.
- Overrides:
- loadSimulation in class CommandParser