|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectklaus.engine.EngineData
public class EngineData
Saves the data for a chess engine
Field Summary | |
---|---|
static int |
ENGINE_PROTOCOL_UCI
UCI Engine (not supported up to now) |
static int |
ENGINE_PROTOCOL_WINBOARD_XBOARD
WinBoard / XBoard engine. |
private int |
engineType
The engine's type / protocol |
private String |
executable
The engine's command line, that is the path to an exe file (with settings?) |
private String |
name
|
static EngineData |
NO_ENGINE
Shows that no engine was loaded. |
private HashMap<String,String> |
properties
A hash map containing engine settings. |
Constructor Summary | |
---|---|
EngineData(int type,
String cmdLine,
String name)
Create the data for a new engine. |
Method Summary | |
---|---|
boolean |
amIDefault()
Checks if this is the default engine |
Engine |
createEngine()
Create an engine backend from this engine data |
String |
getDescription()
Create a description of the engine, e. g. for the engine configuration view |
int |
getEngineType()
|
String |
getExecutable()
|
String |
getName()
|
String |
getSetting(String key)
|
HashMap<String,String> |
getSettings()
|
void |
setEngineType(int engineType)
|
void |
setExecutable(String executable)
|
void |
setName(String name)
|
void |
setSetting(String key,
String value)
Edit an engine setting |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final EngineData NO_ENGINE
private String executable
private String name
private int engineType
public static final int ENGINE_PROTOCOL_UCI
public static final int ENGINE_PROTOCOL_WINBOARD_XBOARD
private HashMap<String,String> properties
Constructor Detail |
---|
public EngineData(int type, String cmdLine, String name)
type
- the engine's type/protocol (Winboard/Xboard/UCI???)cmdLine
- the engine's command line (e.g. /usr/bin/gnuchessx)Method Detail |
---|
public Engine createEngine() throws IOException
IOException
- if the engine was not started due to an IO Exceptionpublic String getDescription()
public String toString()
toString
in class Object
public int getEngineType()
public String getExecutable()
public String getName()
public void setEngineType(int engineType)
public void setExecutable(String executable)
public void setName(String name)
public boolean amIDefault()
public void setSetting(String key, String value)
key
- the settings's keyvalue
- the setting's valuepublic String getSetting(String key)
public HashMap<String,String> getSettings()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |