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
|
template <class KeyType, class ValueType>
inline Entry<KeyType, ValueType>::Entry() {}
template <class KeyType, class ValueType>
inline Entry<KeyType, ValueType>::Entry(const KeyType& searchKey, const ValueType& newValue) : key(searchKey), value(newValue) {}
template <class KeyType, class ValueType>
inline ValueType Entry<KeyType, ValueType>::getValue() const { return value; }
template <class KeyType, class ValueType>
inline KeyType Entry<KeyType, ValueType>::getKey() const { return key; }
template <class KeyType, class ValueType>
inline void Entry<KeyType, ValueType>::setValue(const ValueType& newValue) {
value = newValue;
}
template <class KeyType, class ValueType>
inline void Entry<KeyType, ValueType>::setKey(const KeyType& newKey) {
key = newKey;
}
template < class KeyType, class ValueType>
bool Entry<KeyType, ValueType>::operator==(const Entry<KeyType, ValueType>&rightHandItem) const
{
return (key == rightHandItem.getKey());
}
template < class KeyType, class ValueType>
bool Entry<KeyType, ValueType>::operator>(const Entry<KeyType, ValueType>& leftHandItem) const
{
return (key > leftHandItem.getKey());
}
|