www.pudn.com > MyElevator.rar > Elevator.h


#ifndef __Elevator_H__ 
#define __Elevator_H__ 
#include "Afxwin.h" 
#include "Stop.h" 
#include "Step.h" 
#include  
 
 
class CElevator 
{ 
public: 
	UINT     m_iHeight; 
	CElevator(); 
	~CElevator(); 
	float GetWaitTime(CStop stop1 , CStop stop2); 
 
	float GetFloor() ; 
	UINT GetHeight() { return m_iHeight;} 
	UINT GetPerson() { return m_iLoadNum;} 
 
	bool StepIn(bool IsAttainFloor);  
	bool HaveTask()  { return !m_StepList.empty(); } 
 
	void SetStatus(_STATUS status)  { m_Status = status;} 
	_STATUS GetStatus() {  return m_Status;} 
 
	void DropAndLoad(UINT Floor , UINT& in , UINT & out); 
 
	void InsertStop(_STATUS status , CStop stop1 , CStop stop2); 
 
private: 
	 
	UINT    m_iFloor; 
	UINT	m_iLoadNum; 
	_STATUS m_Status; 
    list m_StepList; 
}; 
 
#endif