#ifndef __KEYINT_H__ #define __KEYINT_H__ #include "datalibx.h" ////////////////////////////////////////////////////////////////////////////// // KeyInt Functions // class CKeyInt { public: CKeyInt(); ~CKeyInt(); public: inline VOID SetNull(); inline VOID Set(const UINT_32 uiValue); inline UINT_32 Get() const; public: inline BOOL operator==(const CKeyInt &key) const; inline BOOL operator<(const CKeyInt &key) const; inline BOOL operator>(const CKeyInt &key) const; inline BOOL operator<=(const CKeyInt &key) const; inline BOOL operator>=(const CKeyInt &key) const; inline UINT_32 Hash() const; VOID Display() const; protected: UINT_32 m_uiValue; }; ////////////////////////////////////////////////////////////////////////////// // Inlined Functions // inline VOID CKeyInt::SetNull() { m_uiValue = 0; } inline VOID CKeyInt::Set(const UINT_32 uiValue) { m_uiValue = uiValue; } inline UINT_32 CKeyInt::Get() const { return m_uiValue; } inline BOOL CKeyInt::operator==(const CKeyInt &key) const { return m_uiValue == key.m_uiValue; } inline BOOL CKeyInt::operator<(const CKeyInt &key) const { return m_uiValue < key.m_uiValue; } inline BOOL CKeyInt::operator>(const CKeyInt &key) const { return m_uiValue > key.m_uiValue; } inline BOOL CKeyInt::operator<=(const CKeyInt &key) const { return m_uiValue <= key.m_uiValue; } inline BOOL CKeyInt::operator>=(const CKeyInt &key) const { return m_uiValue >= key.m_uiValue; } inline UINT_32 CKeyInt::Hash() const { return m_uiValue; } inline VOID SetNull(CKeyInt *pkey) { pkey->SetNull(); } inline VOID Print(CKeyInt *pkey) { pkey->Display(); } #endif // __KEYINT_H__