Method Maps4
SymbolDescription
IntMap
IntMapSnapshotA IntMapSnapshot is created via IntMap.Snapshot(). It captures the keys on a map so they can be read. Snapshots must be freed with delete or CloseHandle().
StringMapObject-oriented wrapper for maps.
StringMapSnapshotA StringMapSnapshot is created via StringMap.Snapshot(). It captures the keys on a map so they can be read. Snapshots must be freed with delete or CloseHandle().
Functions14
SymbolDescription
ClearTrieClears all entries from a Map.
CreateTrieCreates a hash map. A hash map is a container that can map strings (called "keys") to arbitrary values (cells, arrays, or strings). Keys in a hash map are unique. That is, there is at most one entry in the map for a given key. Insertion, deletion, and lookup in a hash map are all considered to be fast operations, amortized to O(1), or constant time. The word "Trie" in this API is historical. As of SourceMod 1.6, tries have been internally replaced with hash tables, which have O(1) insertion time instead of O(n).
CreateTrieSnapshotCreates a snapshot of all keys in the map. If the map is changed after this call, the changes are not reflected in the snapshot. Keys are not sorted.
GetTrieArrayRetrieves an array in a Map.
GetTrieSizeRetrieves the number of elements in a map.
GetTrieSnapshotKeyRetrieves the key string of a given key in a map snapshot.
GetTrieStringRetrieves a string in a Map.
GetTrieValueRetrieves a value in a Map.
RemoveFromTrieRemoves a key entry from a Map.
SetTrieArraySets an array value in a Map, either inserting a new entry or replacing an old one.
SetTrieStringSets a string value in a Map, either inserting a new entry or replacing an old one.
SetTrieValueSets a value in a hash map, either inserting a new entry or replacing an old one.
TrieSnapshotKeyBufferSizeReturns the buffer size required to store a given key. That is, it returns the length of the key plus one.
TrieSnapshotLengthReturns the number of keys in a map snapshot. Note that this may be different from the size of the map, since the map can change after the snapshot of its keys was taken.