@NoOffset @Properties(inherit=ale.class) public class Settings extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
Settings(OSystem osystem)
Create a new settings abstract class
|
Settings(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBool(BytePointer key) |
boolean |
getBool(BytePointer key,
boolean strict)
Get the value assigned to the specified key.
|
boolean |
getBool(String key) |
boolean |
getBool(String key,
boolean strict) |
float |
getFloat(BytePointer key) |
float |
getFloat(BytePointer key,
boolean strict)
Get the value assigned to the specified key.
|
float |
getFloat(String key) |
float |
getFloat(String key,
boolean strict) |
int |
getInt(BytePointer key) |
int |
getInt(BytePointer key,
boolean strict)
Get the value assigned to the specified key.
|
int |
getInt(String key) |
int |
getInt(String key,
boolean strict) |
void |
getSize(BytePointer key,
int[] x,
int[] y) |
void |
getSize(BytePointer key,
IntBuffer x,
IntBuffer y) |
void |
getSize(BytePointer key,
IntPointer x,
IntPointer y)
Get the x*y size assigned to the specified key.
|
void |
getSize(String key,
int[] x,
int[] y) |
void |
getSize(String key,
IntBuffer x,
IntBuffer y) |
void |
getSize(String key,
IntPointer x,
IntPointer y) |
BytePointer |
getString(BytePointer key) |
BytePointer |
getString(BytePointer key,
boolean strict)
Get the value assigned to the specified key.
|
String |
getString(String key) |
String |
getString(String key,
boolean strict) |
BytePointer |
loadCommandLine(int argc,
byte[] argv) |
String |
loadCommandLine(int argc,
ByteBuffer argv) |
BytePointer |
loadCommandLine(int argc,
BytePointer argv) |
BytePointer |
loadCommandLine(int argc,
PointerPointer argv)
This method should be called to load the arguments from the commandline.
|
void |
loadConfig()
This method should be called to load the current settings from an rc file.
|
void |
loadConfig(BytePointer config_file)
This method loads the given
|
void |
loadConfig(String config_file) |
void |
saveConfig()
This method should be called to save the current settings to an rc file.
|
void |
setBool(BytePointer key,
boolean value)
Set the value associated with key to the given value.
|
void |
setBool(String key,
boolean value) |
void |
setFloat(BytePointer key,
float value)
Set the value associated with key to the given value.
|
void |
setFloat(String key,
float value) |
void |
setInt(BytePointer key,
int value)
Set the value associated with key to the given value.
|
void |
setInt(String key,
int value) |
void |
setSize(BytePointer key,
int value1,
int value2)
Set the value associated with key to the given value.
|
void |
setSize(String key,
int value1,
int value2) |
void |
setString(BytePointer key,
BytePointer value)
Set the value associated with key to the given value.
|
void |
setString(String key,
String value) |
void |
usage()
This method should be called to display usage information.
|
void |
validate()
This method should be called *after* settings have been read,
to validate (and change, if necessary) any improper settings.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getPointer, getPointer, getPointer, getPointer, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, offsetof, parseBytes, physicalBytes, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic Settings(Pointer p)
Pointer.Pointer(Pointer).public Settings(OSystem osystem)
public void loadConfig()
public void loadConfig(@Cast(value="const char*") BytePointer config_file)
public void loadConfig(String config_file)
public void saveConfig()
@StdString public BytePointer loadCommandLine(int argc, @Cast(value="char**") PointerPointer argv)
@StdString public BytePointer loadCommandLine(int argc, @Cast(value="char**") @ByPtrPtr BytePointer argv)
@StdString public String loadCommandLine(int argc, @Cast(value="char**") @ByPtrPtr ByteBuffer argv)
@StdString public BytePointer loadCommandLine(int argc, @Cast(value="char**") @ByPtrPtr byte[] argv)
public void validate()
public void usage()
public int getInt(@StdString BytePointer key, @Cast(value="bool") boolean strict)
key - The key of the setting to lookuppublic int getInt(@StdString BytePointer key)
public int getInt(@StdString String key, @Cast(value="bool") boolean strict)
public int getInt(@StdString String key)
public float getFloat(@StdString BytePointer key, @Cast(value="bool") boolean strict)
key - The key of the setting to lookuppublic float getFloat(@StdString BytePointer key)
public float getFloat(@StdString String key, @Cast(value="bool") boolean strict)
public float getFloat(@StdString String key)
@Cast(value="bool") public boolean getBool(@StdString BytePointer key, @Cast(value="bool") boolean strict)
key - The key of the setting to lookup@Cast(value="bool") public boolean getBool(@StdString BytePointer key)
@Cast(value="bool") public boolean getBool(@StdString String key, @Cast(value="bool") boolean strict)
@Cast(value="bool") public boolean getBool(@StdString String key)
@StdString public BytePointer getString(@StdString BytePointer key, @Cast(value="bool") boolean strict)
key - The key of the setting to lookup@StdString public BytePointer getString(@StdString BytePointer key)
@StdString public String getString(@StdString String key, @Cast(value="bool") boolean strict)
@StdString public String getString(@StdString String key)
public void getSize(@StdString BytePointer key, @ByRef IntPointer x, @ByRef IntPointer y)
key - The key of the setting to lookuppublic void getSize(@StdString BytePointer key, @ByRef int[] x, @ByRef int[] y)
public void getSize(@StdString String key, @ByRef IntPointer x, @ByRef IntPointer y)
public void getSize(@StdString BytePointer key, @ByRef IntBuffer x, @ByRef IntBuffer y)
public void getSize(@StdString String key, @ByRef int[] x, @ByRef int[] y)
public void setInt(@StdString BytePointer key, int value)
key - The key of the settingvalue - The value to assign to the settingpublic void setInt(@StdString String key, int value)
public void setFloat(@StdString BytePointer key, float value)
key - The key of the settingvalue - The value to assign to the settingpublic void setFloat(@StdString String key, float value)
public void setBool(@StdString BytePointer key, @Cast(value="const bool") boolean value)
key - The key of the settingvalue - The value to assign to the settingpublic void setBool(@StdString String key, @Cast(value="const bool") boolean value)
public void setString(@StdString BytePointer key, @StdString BytePointer value)
key - The key of the settingvalue - The value to assign to the settingpublic void setString(@StdString String key, @StdString String value)
public void setSize(@StdString BytePointer key, int value1, int value2)
key - The key of the settingvalue - The value to assign to the settingpublic void setSize(@StdString String key, int value1, int value2)
Copyright © 2020. All rights reserved.