www.pudn.com > MyElevator.rar > Step.h
#ifndef __Step_H__ #define __Step_H__ #include "Afxwin.h" #include "Stop.h" #include#include using namespace std; enum _STATUS { WAIT, UP, DOWN }; class CStep { public: CStop m_StopVector[5]; CStep(); ~CStep(); bool Empty(); bool GetHStop(CStop& stop); _STATUS GetStatus() { return m_status;} void SetStatus(_STATUS status) { m_status = status;} bool GetLStop(CStop& stop); bool InsertStop(_STATUS status , bool bFirst,UINT iHeight ,CStop stop1 , CStop stop2); float GetAllTime(); float GetPartTime(CStop stop , float fHeight); //判断是否到站 判断 是否到一step的有任务的停靠站,到则返回true,反之 返回false bool IsGoToTaskStop(UINT iHeight ,UINT &in , UINT &out , bool & IsAttainFloor, bool & IsPassStep); bool CanLoad(CStop stop1 , CStop stop2); bool IsPassStep(); private: _STATUS m_status; }; #endif