
//File Key.h - contains definition of Key class

#ifndef _key_h
#define _key_h

template <class K, class V>
class Key{

public:
	Key(/*const*/ K & aKey, /*const*/ V & aValue)
		: theKey(aKey), value(aValue){
		//All initialization done in base member initializer list
	}
	Key(const Key<K,V> & aKey)
		: theKey(aKey.theKey), value(aKey.value){
		//All initialization done in base member initializer list
	}
	~Key(){
		//No objects created on the heap
	}
	V * getValue(){
		return &value;
	}
	K * getKey(){
		return &theKey;
	}
	Key<K,V> & operator=(const Key<K,V> & aKey){
		if(this != &aKey){
			theKey = aKey.theKey;
			value = aKey.value;
		}
		return *this
	}
	bool operator==(Key<K,V> aKey){
		if((theKey == aKey.theKey) && (value == aKey.value))
			return true;
		else
			return false;
	}
	void printOn(ostream & ostr) const {
		ostr << "Key: " << theKey << ", Value: " << value;
	}

private:
	K theKey;
	V value;
};

template<class K, class V>
ostream & operator<<(ostream & ostr, const Key<K,V> & aKey) {
	aKey.printOn(ostr);
	return ostr;
}

#endif