#ifndef T2DLL_T2FINFOPTITERATOR_H #define T2DLL_T2FINFOPTITERATOR_H #include "../common.h" class AFX_CLASS_EXPORT T2FInfoPtIterator { public: T2FInfoPtIterator(const T2FloorInfo& inFloorInfo, POINT inPt); virtual ~T2FInfoPtIterator(); BOOL CurrentH(int& outH) const; BOOL Current(T2UnitInfo*& outUnitInfo); BOOL Right(T2UnitInfo*& outUnitInfo); BOOL Left(T2UnitInfo*& outUnitInfo); BOOL RightTenant(T2Tenant*& outTenant); BOOL LeftTenant(T2Tenant*& outTenant); protected: BOOL CalcRightUnitInfo(); BOOL CalcLeftUnitInfo(); BOOL IsValidPosition() const; const T2FloorInfo &mFloorInfo; int mLeftBound; int mRightBound; int mCurrH; T2UnitInfo *mCurrUnitInfo; unsigned int mLastIDSeen; }; inline BOOL T2FInfoPtIterator::IsValidPosition() const { return (mCurrH > -1); } #endif