Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
multiMap< Class K, Class V > Class Reference

Associative array template, with multiple values per key
usage: More...

Private Member Functions

void ~multiMap ()
void Clear ()
int Count ()
array< V > Get (K key)
array< V > GetByIndex (int index)
GetKeyByIndex (int index)
bool HasKey (K key)
void Insert (K key, V value)
void Remove (K key)
void RemoveByIndex (int index)

Private Attributes

ref array< K > m_keys
ref array< ref array< V > > m_values

Detailed Description

Associative array template, with multiple values per key
usage:

ref multiMap<string, int> myMap = new multiMap<string, int>;
myMap.Insert("jozo", 7);
myMap.Insert("jozo", 3);
myMap.Insert("jozo", 5);
myMap.Insert("fero", 98);
myMap.Insert("fero", 35);
myMap.Insert("fero", 17);
Print("Jozo:");
myMap.Get("jozo").Debug();
Print("Fero:");
myMap.Get("fero").Debug();
proto void Print(void var)
Prints content of variable to console/log.

Definition at line 865 of file tools.c.

Constructor & Destructor Documentation

◆ ~multiMap()

void ~multiMap ( )
inlineprivate

Definition at line 981 of file tools.c.

References Clear().

Member Function Documentation

◆ Clear()

void Clear ( )
inlineprivate

Definition at line 971 of file tools.c.

References m_keys, and m_values.

◆ Count()

int Count ( )
inlineprivate

Definition at line 961 of file tools.c.

References m_keys.

◆ Get()

array< V > Get ( K key)
inlineprivate

Definition at line 886 of file tools.c.

References m_keys, and m_values.

◆ GetByIndex()

array< V > GetByIndex ( int index)
inlineprivate

Definition at line 902 of file tools.c.

References m_values.

◆ GetKeyByIndex()

K GetKeyByIndex ( int index)
inlineprivate

Definition at line 907 of file tools.c.

References m_keys.

◆ HasKey()

bool HasKey ( K key)
inlineprivate

Definition at line 870 of file tools.c.

References m_keys.

◆ Insert()

void Insert ( K key,
V value )
inlineprivate

Definition at line 912 of file tools.c.

References m_keys, and m_values.

◆ Remove()

void Remove ( K key)
inlineprivate

Definition at line 947 of file tools.c.

References m_keys, and RemoveByIndex().

◆ RemoveByIndex()

void RemoveByIndex ( int index)
inlineprivate

Definition at line 941 of file tools.c.

References m_keys, and m_values.

Referenced by Remove().

Field Documentation

◆ m_keys

ref array<K> m_keys
private

Definition at line 868 of file tools.c.

Referenced by Clear(), Count(), Get(), GetKeyByIndex(), HasKey(), Insert(), Remove(), and RemoveByIndex().

◆ m_values

ref array<ref array<V> > m_values
private

Definition at line 867 of file tools.c.

Referenced by Clear(), Get(), GetByIndex(), Insert(), and RemoveByIndex().


The documentation for this class was generated from the following file:
  • F:/Games/Dayz/scripts/3_game/tools/tools.c