commonMain.it.unibo.tuprolog.solve.channel.InputStore.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of solve-jvm Show documentation
Show all versions of solve-jvm Show documentation
Resolution-agnostic API for logic solvers
package it.unibo.tuprolog.solve.channel
import it.unibo.tuprolog.solve.channel.impl.InputStoreImpl
import kotlin.js.JsName
import kotlin.jvm.JvmOverloads
import kotlin.jvm.JvmStatic
interface InputStore : ChannelStore, InputStore> {
@JsName("stdIn")
val stdIn: InputChannel
@JsName("setStdIn")
fun setStdIn(channel: InputChannel): InputStore
companion object {
const val STDIN = "stdin"
@JsName("fromStandard")
@JvmStatic
@JvmOverloads
fun fromStandard(input: InputChannel = InputChannel.stdIn()): InputStore =
InputStoreImpl(input, mapOf("user_input" to input))
@JsName("of")
@JvmStatic
fun of(channels: Map>): InputStore =
if (STDIN in channels) {
InputStoreImpl(channels[STDIN]!!, channels)
} else {
InputStoreImpl(InputChannel.stdIn(), channels)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy