?? roommanage.h.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 + -