2010-12-04 16:14:34 +00:00
|
|
|
|
/********************************************************
|
|
|
|
|
* KeyValuePair.h *
|
|
|
|
|
* *
|
|
|
|
|
* XFX KeyValuePair definition file *
|
|
|
|
|
* Copyright <EFBFBD> XFX Team. All Rights Reserved *
|
|
|
|
|
********************************************************/
|
|
|
|
|
#ifndef _SYSTEM_COLLECTIONS_GENERIC_KEYVALUEPAIR_
|
|
|
|
|
#define _SYSTEM_COLLECTIONS_GENERIC_KEYVALUEPAIR_
|
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
|
#include <System/Object.h>
|
|
|
|
|
|
2010-12-04 16:14:34 +00:00
|
|
|
|
namespace System
|
|
|
|
|
{
|
|
|
|
|
namespace Collections
|
|
|
|
|
{
|
|
|
|
|
namespace Generic
|
|
|
|
|
{
|
2011-11-07 01:29:50 +00:00
|
|
|
|
// Defines a key/value pair that can be set or retrieved.
|
2010-12-04 16:14:34 +00:00
|
|
|
|
template <class TKey, class TValue>
|
2012-09-28 20:36:02 +00:00
|
|
|
|
struct KeyValuePair : public Object
|
2010-12-04 16:14:34 +00:00
|
|
|
|
{
|
|
|
|
|
public:
|
2012-03-29 22:02:43 +00:00
|
|
|
|
const TKey Key;
|
|
|
|
|
const TValue Value;
|
|
|
|
|
|
2012-09-28 20:36:02 +00:00
|
|
|
|
KeyValuePair(const TKey& key, const TValue& value)
|
2012-03-29 22:02:43 +00:00
|
|
|
|
: Key(key), Value(value)
|
|
|
|
|
{
|
|
|
|
|
}
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
|
KeyValuePair(const KeyValuePair &obj)
|
|
|
|
|
: Key(obj.Key), Value(obj.Value)
|
|
|
|
|
{
|
|
|
|
|
}
|
2012-09-28 20:36:02 +00:00
|
|
|
|
|
|
|
|
|
int GetType() const
|
|
|
|
|
{
|
|
|
|
|
}
|
2010-12-04 16:14:34 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif //_SYSTEM_COLLECTIONS_GENERIC_KEYVALUEPAIR_
|