Class DefaultRobotParser
java.lang.Object
|
+--RobotParser
|
+--DefaultRobotParser
- public class DefaultRobotParser
- extends RobotParser
A class to encapsulate the default functionality required to properly
parse a robot configuration file, and construct the robot's internal
representation using instances of the Model and InvKin classes.
Constructor Summary |
protected |
DefaultRobotParser()
The default constructor which retrieves the language properties, fills
the resource table, and initializes the class variables. |
Method Summary |
int |
decode(java.lang.String s)
Decodes the given token and returns a constant. |
void |
fillResources()
Fills up the resources using the hardcoded and soft-loaded resources. |
Robot |
getRobot()
Returns the Robot representation of the robot to be simulated. |
void |
read(java.io.Reader reader)
Reads in the robot configuration from the Reader stream. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DefaultRobotParser
protected DefaultRobotParser()
- The default constructor which retrieves the language properties, fills
the resource table, and initializes the class variables.
fillResources
public void fillResources()
- Fills up the resources using the hardcoded and soft-loaded resources.
read
public void read(java.io.Reader reader)
throws RobotParserException
- Reads in the robot configuration from the Reader stream.
- Parameters:
reader
- the configuration reader name.- Throws:
- RobotParserException - indicates an error parsing the
configuration file.
- Overrides:
- read in class RobotParser
decode
public int decode(java.lang.String s)
- Decodes the given token and returns a constant.
- Parameters:
s
- theString to decode tokens.- Returns:
- a constant.
getRobot
public Robot getRobot()
- Returns the Robot representation of the robot to be simulated.
- Parameters:
filename
- the name of the configuration file.- Returns:
- the representation of the robot.
- Overrides:
- getRobot in class RobotParser