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

📄 roommanage.h.bak

📁 命令行模式下的简单宾馆管理系统..各种基本功能齐全..属于新人练习作品..hotel manager..
💻 BAK
字号:
/*
 * File: roommanage.h
 * ----------------
 * This file declares the class RoomManage,
 * to manage the rooms.
 */


#ifndef ROOMMANAGE_H
#define ROOMMANAGE_H

#include "room.h"


/* 
 * Struct: AllRoomList
 * -----------------------
 * This struct list contains all 
 * the rooms in the hotel.
 */
struct AllRoomList
{
	Room *curRoom;
	struct AllRoomList *next;
};

/*
struct AccountList
{
	Account *curAccount;
	struct AccountList *next;
};
*/



/*
 * Class: RoomManage
 * -------------------
 * This class contains a list of all
 * the rooms and operation functions.ss
 */
class RoomManage
{
public:
	RoomManage();	//read the data file to initialize the Hotel //not used 	// constructor.
	void SetNumOfRooms( int );
	void SetNumOfAccounts( int );
	int GetNumOfRooms();
	int GetNumOfAccounts();
	void SetAllRoomList();
	void SetGuestInHotel();
	void AddRoom( Room * );		// add a room to the allRoomList.
	bool DeleteRoom( Room * );	// delete a room from the allRoomList.
	//void AddGuest( Account * );
	//void DeleteGuest( Account * );
	Room *GetRoom( int );		// find a room by its roomNum.
	//Account *GetGuest( Account * );
	//struct AllRoomList *GetAllRoomList();
	//struct AccountList *GetGuestInHotel();
	//void DisplayAvailableRoomBrief();	//only display the available rooms' num ,type,price in a list..to choose..
	//void DisplayOneRoomInfo();	//display the room's all detail..
	//void AddFee( Account *, int );
	//void CheckIn( Room *, Account *);
	//void CheckOut( Room *, Account *);
	//void ChangeRoomState( Room *, RoomState );
	void PrintRoomList();		// print all the rooms info in the allRoomList briefly.
	void PrintRoomStateList( RoomState );	// print all the rooms in one kind of states.
	void PrintRoomInfo( Room * );			// print the room info in detail.
	void WriteToFile(ofstream *fout);///	// write the rooms info in the allRoomList to the data file.
	void ReadFromFile(ifstream *fin);///	// read the rooms info from the data file.
	void CleanAllRoom();			// free all the rooms' memory,and empty the allRoomList.
	~RoomManage();		// destructor.
private:
	int numOfRooms;
	int numOfAccounts;
	struct AllRoomList *allRoomList;
	//struct AllAccountList *allAccountList;
	//struct AccountList *guestInHotel;
};

/*
 * Function: NewRoom()
 * Usage: *Room=*Room();
 * ---------------------------
 * This function allow the user to create a new room
 * by entering all the room info,
 * and returns the pointer of the new room.
 */
Room *NewRoom();

#endif

⌨️ 快捷键说明

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