SettingsService

SettingsService object.

Constructors

Link copied to clipboard
constructor(address: Long)

Types

Link copied to clipboard
object Companion

Settings Service companion

Properties

Link copied to clipboard

Address of native referenced object. nullptr if not referencing any native allocated object. Note native allocation will happen only once.

Link copied to clipboard

Current group name.

Link copied to clipboard
val path: String?

Path where settings written using this SettingsService object are stored.

Functions

Link copied to clipboard
external fun beginGroup(prefix: String)

Start a group with the specified name.

Link copied to clipboard
external fun clear()

Clear all settings ( groups and values )

Link copied to clipboard
external fun endGroup()

End the current group.

Link copied to clipboard
fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard
external fun flush()

Write any unsaved changes to permanent storage.

Link copied to clipboard
external fun getBooleanValue(key: String, defaultValue: Boolean = false): Boolean

Get bool value for specified setting key. If the setting doesn't exist, returns defaultValue.

Link copied to clipboard
external fun getDoubleValue(key: String, defaultValue: Double = 0.0): Double

Get double value for specified setting key. If the setting doesn't exist, returns defaultValue.

Link copied to clipboard
external fun getIntValue(key: String, defaultValue: Int = 0): Int

Get int value for specified setting key. If the setting doesn't exist, returns defaultValue.

Link copied to clipboard
external fun getLongValue(key: String, defaultValue: Long = 0): Long

Get double value for specified setting key. If the setting doesn't exist, returns defaultValue.

Link copied to clipboard
external fun getStringValue(key: String, defaultValue: String = ""): String?

Get String value for specified setting key. If the setting doesn't exist, returns defaultValue.

Link copied to clipboard

True if keeps a reference to a C++ SDK object False if keeps a C++ SDK object

Link copied to clipboard
operator fun not(): Boolean

Checks if this object is valid.

Link copied to clipboard
fun release()

Releases the native referenced value of this object if:

Link copied to clipboard
external fun remove(key: String): Int

Remove the specified setting key

Link copied to clipboard
external fun setBooleanValue(key: String, value: Boolean)

Set the value of specified setting key to the given bool value. If the key already exists, the previous value is overwritten.

Link copied to clipboard
external fun setDoubleValue(key: String, value: Double)

Set the value of specified setting key to the given double value. If the key already exists, the previous value is overwritten.

Link copied to clipboard
external fun setIntValue(key: String, value: Int)

Set the value of specified setting key to the given int value. If the key already exists, the previous value is overwritten.

Link copied to clipboard
external fun setLongValue(key: String, value: Long)

Set the value of specified setting key to the given double value. If the key already exists, the previous value is overwritten.

Link copied to clipboard
external fun setStringValue(key: String, value: String)

Set the value of specified setting key to the given String value. If the key already exists, the previous value is overwritten.