#pragma once #include "common.h" class AFX_CLASS_EXPORT T2FInfoAreaIterator { public: T2FInfoAreaIterator(const T2FloorInfo& inFloorInfo, const RECT&); virtual ~T2FInfoAreaIterator(); void Reset(); BOOL CurrentV(int& outV) const; BOOL Current(T2UnitInfo*& outUnitInfo); BOOL Next(T2UnitInfo*& outUnitInfo); BOOL NextTenant(T2Tenant*& outTenant); void GetTenantRect(RECT& outRect); BOOL NextRequest(T2Request*& outRequest); BOOL NextMover(T2Mover*& outMover); protected: BOOL CalcNextUnitInfo(); BOOL IsValidPosition() const; const T2FloorInfo &mFloorInfo; RECT mRect; int mSkipAmount; int mCurrV; int mCurrH; T2UnitInfo *mCurrUnitInfo; unsigned int mLastIDSeen; }; inline BOOL T2FInfoAreaIterator::IsValidPosition() const { return (mCurrH > -1); }