RenderUnitIdGenerator

class RenderUnitIdGenerator(val componentTreeId: Int)

Class that handles generation of unique IDs for RenderUnits for a given ComponentTree. The ID generation uses the component key to create an ID, and creates unique IDs for any components under the same ComponentTree.

Constructors

Link copied to clipboard
constructor(componentTreeId: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns the ComponentTree ID that this ID-generator is linked with.

Functions

Link copied to clipboard
fun calculateLayoutOutputId(componentKey: String, type: Int): Long

Calculates a returns a unique ID for a given component key and output type. The IDs will be unique for components in the ComponentTree this ID generator is linked with. If an ID was already generated for a given component, the same ID will be returned. Otherwise, a new unique ID will be generated