blob: 0c2b8b41928d4782f329b653a8d218edb2addd6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package moe.nea.firm
import ext.StringIdentifiable
import kotlin.enums.enumEntries
abstract class ManagedConfig(val identifier: String) {
protected fun <E : Any> choice(
codec: Codec<E>,
renderer: EnumRenderer<E>,
): ManagedOption<E> {
return TODO()
}
protected inline fun <reified E> choice(
): ManagedOption<E> where E : Enum<E>, E : StringIdentifiable {
return choice(
StringIdentifiable.createCodec { enumValues<E>() },
EnumRenderer.default(),
)
}
}
|