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

org.jetbrains.kotlinx.ggdsl.dsl.columnPointer.kt Maven / Gradle / Ivy

/*
* Copyright 2020-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

package org.jetbrains.kotlinx.ggdsl.dsl

import org.jetbrains.kotlinx.ggdsl.ir.data.ColumnPointer
import org.jetbrains.kotlinx.ggdsl.ir.data.NamedDataInterface
import kotlin.reflect.KProperty

/**
 * Returns a new [ColumnPointer].
 *
 * @param T the type of source
 * @param id the name of source in [NamedDataInterface]
 */
public  fun < T : Any> columnPointer(id: String): ColumnPointer =
    ColumnPointer(id)

/**
 * Returns a new [ColumnPointer].
 *
 * @receiver the name of source in [NamedDataInterface]
 * @param T the type of source
 */
public inline operator fun  String.invoke(): ColumnPointer =
    ColumnPointer(this)


// TODO
public class UnnamedColumnPointer {
    public operator fun getValue(thisRef: Any?, property: KProperty<*>): ColumnPointer {
        return ColumnPointer(property.name)
    }
}

// todo
public inline fun  columnPointer(): UnnamedColumnPointer =
    UnnamedColumnPointer()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy