1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 |
#pragma once
#include "GameDefines.h"
#include "KeyValuePaar.h"
class KeyValueLijst
{
public:
KeyValueLijst();
virtual ~KeyValueLijst();
// Voeg toe op het einde van de lijst
void insert(KeyValuePaar value);
// Vind de item volgens een key en geef de waarde terug
tstring find(tstring key);
// Verander de waarde van een element met een bepaalde key
void change(tstring key, tstring newvalue);
// Wis een waarde
void erase(tstring key);
static const int BASE_SIZE=10;
KeyValueLijst(const KeyValueLijst& p);
KeyValueLijst& operator=(const KeyValueLijst& p);
KeyValueLijst operator+(const KeyValueLijst& p);
KeyValueLijst& operator+=(const KeyValueLijst& p);
bool operator==(const KeyValueLijst& p);
bool operator!=(const KeyValueLijst& p);
void operator>>(tstringstream &p);
private:
void vergrootArray();
int m_AantalElementen,m_Capaciteit;
KeyValuePaar* m_KeyValueArrPtr;
}; |