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

commonMain.it.unibo.tuprolog.solve.AbstractWrapper.kt Maven / Gradle / Ivy

There is a newer version: 1.0.4
Show newest version
package it.unibo.tuprolog.solve

import kotlin.js.JsName

/**
 * Signature to [Wrapped] type, abstract wrapper class
 *
 * @param signature the supported input signature
 *
 * @author Enrico
 */
abstract class AbstractWrapper(
    @JsName("signature") val signature: Signature,
) {
    constructor(name: String, arity: Int, vararg: Boolean = false) : this(Signature(name, arity, vararg))

    /** The wrapped implementation */
    @JsName("wrappedImplementation")
    abstract val implementation: Wrapped

    /** A shorthand to get the signature functor name */
    @JsName("functor")
    val functor: String
        inline get() = signature.name

    /** Gets this wrapped primitive description [Pair] formed by [signature] and wrapped primitive type */
    @JsName("descriptionPair")
    val descriptionPair: Pair
        inline get() = signature to implementation
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy