// Generated by alef. Do not edit by hand.

package dev.kreuzberg

object PostProcessorBridge {
    private val registered = mutableMapOf<String, IPostProcessor>()

    fun register(impl: IPostProcessor): Unit {
        val name = impl.name()
        registered[name] = impl
        KreuzbergBridge.nativeRegisterPostProcessor(impl)
    }

    fun unregister(name: String): Unit {
        registered.remove(name)
        KreuzbergBridge.nativeUnregisterPostProcessor(name)
    }

    fun clearAll(): Unit {
        registered.clear()
        KreuzbergBridge.nativeClearPostProcessors()
    }

    fun getAll(): Map<String, IPostProcessor> = registered.toMap()
}
