24 lines
474 B
C++
24 lines
474 B
C++
#ifndef KeyValuePairH
|
|
#define KeyValuePairH
|
|
|
|
template <typename K, typename V>
|
|
struct KeyValuePair
|
|
{
|
|
public:
|
|
KeyValuePair() {}
|
|
KeyValuePair(K key, V value)
|
|
{
|
|
this->Key = new K(key);
|
|
this->Value = new V(value);
|
|
}
|
|
|
|
K *Key = nullptr;
|
|
V *Value = nullptr;
|
|
|
|
K GetKey() { return (K)*Key; }
|
|
V GetValue() { return (V)*Value; }
|
|
|
|
void SetKey(K Key) { this->Key = &Key; }
|
|
void SetValue(V Value) { this->Value = &Value; }
|
|
};
|
|
#endif |