Modifier and Type | Field and Description |
---|---|
static String |
HEADER
Header XML.
|
static String |
PREFIX
Prefix XML node.
|
Constructor and Description |
---|
Configurer(Media media)
Load data from configuration media.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getBoolean(String attribute,
String... path)
Get a boolean in the xml tree.
|
double |
getDouble(String attribute,
String... path)
Get a double in the xml tree.
|
int |
getInteger(String attribute,
String... path)
Get an integer in the xml tree.
|
Media |
getMedia()
Return the associated media.
|
String |
getPath()
Get the configuration directory path.
|
XmlNode |
getRoot()
Get the data root container for raw access.
|
String |
getString(String attribute,
String... path)
Get a string in the xml tree.
|
String |
getText(String... path)
Get the node text value.
|
void |
save()
Save the configurer.
|
public static final String HEADER
public static final String PREFIX
public Configurer(Media media)
media
- The xml media.LionEngineException
- If error when opening the media.public void save()
LionEngineException
- If error on saving.public XmlNode getRoot()
public String getPath()
public Media getMedia()
public String getText(String... path)
path
- The node path.LionEngineException
- If unable to read node.public String getString(String attribute, String... path)
attribute
- The attribute to get as string.path
- The node path (child list)LionEngineException
- If unable to read node.public boolean getBoolean(String attribute, String... path)
attribute
- The attribute to get as boolean.path
- The node path (child list)LionEngineException
- If unable to read node.public int getInteger(String attribute, String... path)
attribute
- The attribute to get as integer.path
- The node path (child list)LionEngineException
- If unable to read node or not a valid integer.public double getDouble(String attribute, String... path)
attribute
- The attribute to get as double.path
- The node path (child list)LionEngineException
- If unable to read node.Copyright © 2016 Byron 3D Games Studio. All rights reserved.