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

main.cesium.PropertyBag.kt Maven / Gradle / Ivy

// Automatically generated - do not modify!

package cesium

/**
 * A [Property] whose value is a key-value mapping of property names to the computed value of other properties.
 * @see Online Documentation
 *
 * @constructor
 * @param [value] An object, containing key-value mapping of property names to properties.
 * @param [createPropertyCallback] A function that will be called when the value of any of the properties in value are not a Property.
 * @see Online Documentation
 */
@JsName("\$cesium__PropertyBag")
external class PropertyBag(
    value: Any? = definedExternally,
    createPropertyCallback: Function<*>? = definedExternally,
) {
    /**
     * Gets the names of all properties registered on this instance.
     * @see Online Documentation
     */
    var propertyNames: Array

    /**
     * Gets a value indicating if this property is constant.  This property
     * is considered constant if all property items in this object are constant.
     * @see Online Documentation
     */
    val isConstant: Boolean

    /**
     * Gets the event that is raised whenever the set of properties contained in this
     * object changes, or one of the properties itself changes.
     * @see Online Documentation
     */
    val definitionChanged: Event

    /**
     * Determines if this object has defined a property with the given name.
     * @param [propertyName] The name of the property to check for.
     * @return True if this object has defined a property with the given name, false otherwise.
     * @see Online Documentation
     */
    fun hasProperty(propertyName: String): Boolean

    /**
     * Adds a property to this object.
     * @param [propertyName] The name of the property to add.
     * @param [value] The value of the new property, if provided.
     * @param [createPropertyCallback] A function that will be called when the value of this new property is set to a value that is not a Property.
     * @see Online Documentation
     */
    fun addProperty(
        propertyName: String,
        value: Any? = definedExternally,
        createPropertyCallback: Function<*>? = definedExternally,
    )

    /**
     * Removed a property previously added with addProperty.
     * @param [propertyName] The name of the property to remove.
     * @see Online Documentation
     */
    fun removeProperty(propertyName: String)

    /**
     * Gets the value of this property.  Each contained property will be evaluated at the given time, and the overall
     * result will be an object, mapping property names to those values.
     * @param [time] The time for which to retrieve the value.
     * @param [result] The object to store the value into, if omitted, a new instance is created and returned.
     *   Note that any properties in result which are not part of this PropertyBag will be left as-is.
     * @return The modified result parameter or a new instance if the result parameter was not supplied.
     * @see Online Documentation
     */
    fun getValue(
        time: JulianDate,
        result: Any? = definedExternally,
    ): Any

    /**
     * Assigns each unassigned property on this object to the value
     * of the same property on the provided source object.
     * @param [source] The object to be merged into this object.
     * @param [createPropertyCallback] A function that will be called when the value of any of the properties in value are not a Property.
     * @see Online Documentation
     */
    fun merge(
        source: Any,
        createPropertyCallback: Function<*>? = definedExternally,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy