⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 elevator.h

📁 这个程序是对电梯的模拟
💻 H
字号:
// Elevator.h: interface for the Elevator class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ELEVATOR_H__B774ADA7_09F0_4980_8F06_2224DE47FE3B__INCLUDED_)
#define AFX_ELEVATOR_H__B774ADA7_09F0_4980_8F06_2224DE47FE3B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "DataInfo.h"
#include "People.h"
#include "Button.h"	// Added by ClassView
#include "Door.h"	// Added by ClassView
#include "Bell.h"	// Added by ClassView




class Elevator  
{
public:
	void BellRing();
	int GetStatus();
	void PeopleEnter(list<People *> &pl,int up);//up=true is the up
	void PeopleOut();
	bool IsPeopleEnter();
	bool IsPeopleOut();
	int GetFloorAt();
	bool IsGetTop();
	bool IsGetBottom();
	Elevator(int fcount=0,int num=-1);
	void Stop();
	void CloseDoor();
	void OpenDoor();
	virtual ~Elevator();


	static unsigned peopleLimit;

	list<People *> pList;  //people in elevator
    vector<Button *> numButton;  //数字按钮,在电梯初始化时根据建筑的层数确定
	Door door;

	int bfloors;    //楼层数,
	int floorAt;    //the variable is stand witch floor is this elevator at now.
	int status;     //-1——down,1——up,0——stop,
	int number;            //the elevator's number
	int  *runline;  //It's a array, and it lead this elevator to run,
	   //TT——Not stop,
	   //OUT——Some people will go out elevator,
	   //UP——Some people will go into elevator and up
	   //DOWN——Some people will go into elevator and up
       //UP_DOWN, OUT_UP, OUT_DOWN, OUT_UP_DOWN
	   


private:
	Bell bell;
	Button doorOpenButton;  //开门按钮
	Button doorCloseButton; //关门按钮
};

#endif // !defined(AFX_ELEVATOR_H__B774ADA7_09F0_4980_8F06_2224DE47FE3B__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -