API reference
API reference
Select your platform
No SDKs available
No versions available

DataModel

DataModel

class DataModel(val dataModel_: Long, val attributeCache_: AttributeCache)

Constructors

NameSummary
DataModel
constructor(dataModel_: Long, attributeCache_: AttributeCache)

Types

NameSummary
Companion
object Companion
inner class KeyIterator(dm_: DataModel, it_: Long)

Properties

NameSummary
attributeCache_
val attributeCache_: AttributeCache
dataModel_
val dataModel_: Long

Functions

NameSummary
addToKeyValueMap
fun addToKeyValueMap(id: Long, attribute: Int, values: HashMap<*, *>)
allocateEntity
fun allocateEntity(): Long
attribute
fun attribute(attribute: Int): DataModel.KeyIterator
attributeChanged
fun attributeChanged(attribute: Int): DataModel.KeyIterator
createEntity
fun createEntity(): Entity
Creates a new entity in the data model.
fun createEntity(vararg components: ComponentBase): Entity
fun createEntity(components: List<ComponentBase>): Entity
Creates a new entity in the data model with components.
createUniqueEntity
fun createUniqueEntity(id: Long): Entity
deleted
fun deleted(): DataModel.KeyIterator
deleteEntity
fun deleteEntity(eid: Long)
destroy
fun destroy()
getAttributeValueAt
fun getAttributeValueAt(id: Long, attribute: Int, key: Any): Any?
getEventListenerForEvent
fun getEventListenerForEvent(eventType: String): Set<<Error class: unknown class><Entity, EventListener<EventArgs>>>
getHandle
fun getHandle(): Long
getKeyValueComponentData
fun getKeyValueComponentData(id: Long, componentData: MutableMap<Int, <Error class: unknown class><AttributeType, Any?>>, cachable: Boolean = false)
getKeyValueMap
inline fun <T, V> getKeyValueMap(id: Long, attribute: Int): HashMap<T, V>
hasKey
fun hasKey(id: Long, attribute: Int): Boolean
hasKeyDeprecated
fun hasKeyDeprecated(id: Long, attribute: Int): Boolean
isLocalEntity
fun isLocalEntity(ent: Long): Boolean
nativeGetKeyValueMap
external fun nativeGetKeyValueMap(dataModel: Long, id: Long, attribute: Int): Array<Any>
processListeners
fun processListeners()
queryAll
fun queryAll(any: IntArray, required: IntArray): LongArray
queryChanged
fun queryChanged(anyChanged: IntArray, required: IntArray): LongArray
queryDSL
fun queryDSL(code: IntArray): LongArray
registerAttributeListener
fun registerAttributeListener(attribute: Int, listener: AttributeListener)
registerComponentDependent
fun registerComponentDependent(changingComponent: Int, dependent: Int)
registerComponentListener
fun registerComponentListener(componentID: Int, componentClass: KClass<*>, listener: ComponentListener)
registerEventListener
fun registerEventListener(entity: Entity, eventType: String, listener: EventListener<EventArgs>)
removeComponentListener
fun removeComponentListener(componentID: Int)
removeKeyValue
fun removeKeyValue(id: Long, attribute: Int)
reset
fun reset()
sendEvent
fun sendEvent(entity: Entity, eventType: String, eventArgs: EventArgs)
setKeyValueComponentData
fun setKeyValueComponentData(id: Long, componentData: MutableMap<Int, <Error class: unknown class><AttributeType, Any?>>, componentID: Int)
setKeyValueMapValueAt
fun setKeyValueMapValueAt(id: Long, attribute: Int, key: Any, value: Any): Boolean
setKeyValueTuple
fun setKeyValueTuple(id: Long, attribute: Int, values: Array<Any>)
unflattenArrForJNI
inline fun <T, V> unflattenArrForJNI(arr: Array<Any>): HashMap<T, V>

Companion

object Companion

Functions

NameSummary
create
fun create(): DataModel
Did you find this page helpful?
Thumbs up icon
Thumbs down icon