#pragma once template class SHQuene { public: SHQuene(long length = -1); virtual ~SHQuene(); virtual T& operator[](long i) = 0; virtual void Clear() = 0; virtual long GetLength() = 0; virtual bool DeQuene(T&t) = 0; virtual bool EnQuene(T const&t) = 0; virtual bool GetHeadData(T&t) = 0; virtual bool GetTailData(T&t) = 0; bool IsLengthLimited(); long GetMaxLength(); bool IsEmpty(); void SetMaxLength(long length); protected: long maxLength; }; template SHQuene::SHQuene(long length) { maxLength=length; } template SHQuene::~SHQuene() { } template void SHQuene::SetMaxLength(long length) { maxLength=length; } template long SHQuene::GetMaxLength() { return maxLength; } template bool SHQuene::IsLengthLimited() { return maxLength >= 0; } template bool SHQuene::IsEmpty() { return GetLength() == 0; }