All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.it.unibo.tuprolog.solve.channel.OutputChannel.kt Maven / Gradle / Ivy

package it.unibo.tuprolog.solve.channel

import it.unibo.tuprolog.solve.channel.impl.OutputChannelFromFunction
import it.unibo.tuprolog.solve.exception.PrologWarning
import kotlin.js.JsName
import kotlin.jvm.JvmStatic

interface OutputChannel : Channel {
    companion object {
        @JvmStatic
        @JsName("stdOut")
        fun  stdOut(): OutputChannel = stdout()

        @JvmStatic
        @JsName("stdErr")
        fun  stdErr(): OutputChannel = stderr()

        @JvmStatic
        @JsName("warning")
        fun warn(): OutputChannel = warning()

        @JvmStatic
        @JsName("of")
        fun  of(consumer: (T) -> Unit): OutputChannel = OutputChannelFromFunction(consumer)
    }

    @JsName("write")
    fun write(value: T)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy