DayZ Scripts
PC Stable Documentation
 
Loading...
Searching...
No Matches
multiMap< Class K, Class V > Class Reference

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

Private Member Functions

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

Private Attributes

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

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.

Constructor & Destructor Documentation

◆ ~multiMap()

void ~multiMap ( )
inlineprivate

References Clear().

Member Function Documentation

◆ Clear()

void Clear ( )
inlineprivate

◆ Count()

int Count ( )
inlineprivate

◆ Get()

array< V > Get ( key)
inlineprivate

◆ GetByIndex()

array< V > GetByIndex ( int  index)
inlineprivate

◆ GetKeyByIndex()

K GetKeyByIndex ( int  index)
inlineprivate

◆ HasKey()

bool HasKey ( key)
inlineprivate

◆ Insert()

void Insert ( key,
value 
)
inlineprivate

◆ Remove()

void Remove ( key)
inlineprivate

◆ RemoveByIndex()

void RemoveByIndex ( int  index)
inlineprivate

Field Documentation

◆ m_keys

private ref array<K> m_keys
private

◆ m_values

private ref array<ref array<V> > m_values
private

The documentation for this class was generated from the following file: