#ifndef T2DLL_T2REQUEST_H #define T2DLL_T2REQUEST_H #include "../common.h" #include "T2DrawableObject.h" class AFX_CLASS_EXPORT T2Request : public T2DrawableObject { public: T2Request(); virtual ~T2Request(); virtual void SetUsed(BOOL); virtual BOOL Enter(CLink*); virtual BOOL Leave(CLink*); virtual unsigned int Idle(T2TowerDoc*); virtual void Draw(T2TowerDoc*, const RECT&); virtual void DrawHitMask(T2TowerDoc*); void InitRequest(unsigned int, int, const RECT&); void InitRequest(T2FloorInfo*, unsigned int, POINT, ERequestUpDown); void RemoveRequest(T2TowerDoc*); void StopRemoved(T2TowerDoc*, int); void CalcArea(RECT&); void CalcOnArea(RECT&); void CalcOffArea(RECT&); void CalcPrevArea(RECT&); BOOL CalcPersonArea(T2People*, RECT&); T2People* LeaveFirst(); BOOL Regist(T2TowerDoc*, T2People*); void ChangeOffPPLStatus(T2FloorInfo*, T2People*); void AddOnPeople(T2People*); T2People* RemoveOnPeople(); void AddOffPeople(T2People*); T2People* RemoveOffPeople(); void BreakoutEmergency(T2TowerDoc*); T2People* FindPeople(int) const; void CalcValidArea(RECT&); unsigned int GetRequestID() const { return mRequestID; } unsigned int GetMoverID() const { return mMoverID; } void MoverIDChanged(unsigned int id) { mMoverID = id; } ERequestUpDown GetUpDown() const { return mIsGoDown ? ERequestUpDown_1 : ERequestUpDown_0; } POINT GetHeadPosition() const { return mHeadPosition; } int GetModuleIndex() const { return mModuleIndex; } BOOL IsModuleReserved() const { return (mModuleIndex > -1); } void CancelReservingModule() { mModuleIndex = -1; } int GetDrawWidth() const { return mDrawWidth; } void SetDrawWidth(int w) { mDrawWidth = w; } int GetNumOfContent() const { return mNumOfContent; } protected: virtual void LoadSelf(T2Archive&, T2TowerDoc*); virtual void SaveSelf(T2Archive&); void RemoveContents(T2FloorInfo*); void DrawUp(T2TowerDoc*, const RECT&); void DrawDown(T2TowerDoc*, const RECT&); void* GetInfoClick(T2TowerDoc*, POINT); void* GetInfoClickUp(T2TowerDoc*, POINT); void* GetInfoClickDown(T2TowerDoc*, POINT); BOOL CalcIncQueueArea(RECT&) const; void DrawFinished(); T2People* FindUpPeople(int) const; T2People* FindDownPeople(int) const; friend class T2ElevatorModule; friend class T2RequestArray; friend class T2TowerMainView; unsigned int mRequestID; unsigned int mMoverID; POINT mHeadPosition; BOOL mIsGoDown; int mModuleIndex; int mDrawWidth; int m2C; int m30; T2People *mOnPeople; T2People *mOffPeople; T2People *mFirst; T2People *mLast; BOOL m44; BOOL mPeopleRemoved; int mNumOfContent; }; #endif