Settings

abstract class Settings<ValueType>(fileName: String)

A simple setting processor.

Author

KKoishi_

Inheritors

Constructors

Link copied to clipboard
constructor(fileName: String)

Types

Link copied to clipboard
class Handler<ValueType>(val key: String, val handle: (ValueType) -> Unit)
Link copied to clipboard
class INI(fileName: String) : Settings<String>

The key of ini parameters will be "section_name::key", and if there is no section, it will be "key".

Properties

Link copied to clipboard
val file: Path

Functions

Link copied to clipboard
abstract fun addHandler(key: String, handle: (ValueType) -> Unit)

Add setting entry handler.

Link copied to clipboard
abstract fun getValue(key: String): ValueType
Link copied to clipboard
fun load()
Link copied to clipboard
abstract fun read(): Boolean

Read settings.