#ifndef _COMMON_BINARYSEARCHARRAY_HPP_ #define _COMMON_BINARYSEARCHARRAY_HPP_ #ifndef _COMMON_ARRAY_HPP_ #include #endif #ifndef _COMMON_BLOCK_HPP_ #include #endif template class BinarySearchArray { public: BinarySearchArray(Array &sortedVector); virtual ~BinarySearchArray(); WORD searchItem(const T &desiredItem,T &foundItem); WORD searchItem(const T &desiredItem,Block &foundItems); private: WORD searchItem(const T &desiredItem,T &foundItem,LONG &foundIndex); DWORD itemCount(void)const; Array &mSortedVector; DWORD mItemCount; }; template inline BinarySearchArray::BinarySearchArray(Array &sortedVector) : mSortedVector(sortedVector), mItemCount(mSortedVector.size()) { } template inline BinarySearchArray::~BinarySearchArray(void) { } template inline DWORD BinarySearchArray::itemCount(void)const { return mItemCount; } #if defined(_MSC_VER) #include #endif #endif