DIFF

class multiMap<Class K, Class V>Source

Part of Tools

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();

Constructors 1

void ~multiMap()
References Clear()

Members 2

private ref array<ref array<V> > m_values
Referenced by Clear(), Get(), GetByIndex()
Show 2 more, Insert(), and RemoveByIndex()
private ref array<K> m_keys
Referenced by Clear(), Count(), Get()
Show 5 more, GetKeyByIndex(), HasKey(), Insert(), Remove(), and RemoveByIndex()

Methods 9

array<V> Get(K key)
References array.Find(), array.Get(), m_keys
Show 1 more, m_values
array<V> GetByIndex(int index)
References array.Get(), and m_values
K GetKeyByIndex(int index)
References array.Get(), and m_keys
void Insert(K key, V value)
References array.Find(), array.Get(), array.Insert()
Show 5 more, array.Insert(), Insert(), array.Insert(), m_keys, and m_values
void RemoveByIndex(int index)
References array.Remove(), array.Remove(), m_keys
Show 1 more, m_values
Referenced by Remove()
void Remove(K key)
int Count()
References array.Count(), and m_keys
void Clear()
References array.Clear(), array.Clear(), m_keys
Show 1 more, m_values
Referenced by ~multiMap()