KeyedMap

Data Structures View source
KeyedMap

Typed value intrinsic used by FastKeyedMap. Keep the name distinct from keyedMapPut: the legacy fixed signature must remain unambiguous for existing callers. Lua lowers this to one raw table store; Jass specializes int and class values to the handle or string integer fallback.

Types

Functions and constants

public function keyedMapCreate() returns int

Creates an empty map. Free it with keyedMapDestroy when it is no longer needed.

public function keyedMapPut(int map, handle key, int value)

Stores value under key. A null key stores nothing.

public function keyedMapGetInt(int map, handle key) returns int

The value stored under key, or 0 when there is none.

public function keyedMapPutNative<K:, V:>(int _map, K _key, V _value)
public function keyedMapGetNative<K:, V:>(int _map, K _key) returns V

Typed get paired with keyedMapPutNative.

public function keyedMapHas(int map, handle key) returns boolean

Whether a value is stored under key.

public function keyedMapRemove(int map, handle key)

Removes the value stored under key, if any.

public function keyedMapDestroy(int map)

Frees the map. Lua lowering clears its backing table in place, even if an alias still references it.

public function keyedMapPutString(int map, string key, int value)
public function keyedMapGetStringInt(int map, string key) returns int
public function keyedMapHasString(int map, string key) returns boolean
public function keyedMapRemoveString(int map, string key)
public function keyedMapHasNative<K:>(int _map, K _key) returns boolean
public function keyedMapRemoveNative<K:>(int _map, K _key)