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

📄 hotel.h.bak

📁 命令行模式下的简单宾馆管理系统..各种基本功能齐全..属于新人练习作品..hotel manager..
💻 BAK
字号:
/*
 * File: hotel.h
 * ----------------
 * This file declares the two main variables:
 * accountManage & roomManage,
 * and a lot of functions to run the management 
 * of the hotel.
 */

#ifndef HOTEL_H
#define HOTEL_H

#include "base.h"
#include "roommanage.h"
#include "accountmanage.h"

/* Constants */
#define ACCOUNTFILE "data\\account.dat"
#define ROOMFILE "data\\room.dat"

/* Package variables */
extern AccountManage accountManage;
extern RoomManage roomManage;

/* Function prototypes */

/*
 * Function: InitAccount()
 * Usage: InitAccount(fileName,accountManage);
 * ----------------------------------------------
 * This function reads the accounts info from the
 * file named fileName,and initializes the accountManage
 * with the accounts info.
 */
void InitAccount( const char *, AccountManage * );


/*
 * Function: InitRoom()
 * Usage: InitRoom(fileName,roomManage);
 * -------------------------------------------
 * This function reads the rooms info from the
 * file named fileName,and initializes the roomManage
 * with the rooms info.
 */
void InitRoom( const char *, RoomManage * );


/*
 * Function: OutAccount()
 * Usage: OutAccount(fileName,accountManage);
 * -------------------------------------------
 * This function write the accounts info in the
 * accountManage to the file named fileName.
 */
void OutAccount( const char *, AccountManage * );


/*
 * Function: OutRoom()
 * Usage: OutRoom(fileName,roomManage);
 * ----------------------------------------
 * This function write the rooms info in the 
 * roomManage to the file named fileName.
 */
void OutRoom( const char *, RoomManage * );


/*
 * Function: SetAccountRoomList()
 * Usage: SetAccountRoomList(accountManage,roomManage);
 * ----------------------------------------------------
 * This function ..en..e..a..o.. ok..
 * It's used to patch up the bug .. in design.
 * In fact,it build the roomList in each account in
 * the accountManage by using the roomNumList in each
 * account.
 */
void SetAccountRoomList( AccountManage *, RoomManage * );


/*
 * Function: CheckIn()
 * Usage: CheckIn(accountManage,roomManage);
 * ------------------------------------------
 * This function provides an interface to Check In.
 */
void CheckIn( AccountManage *, RoomManage * );


/*
 * Function: CheckOut()
 * Usage: CheckOut(accountManage,roomManage);
 * ------------------------------------------
 * This function provides an interface to Check Out.
 */
void CheckOut( AccountManage *, RoomManage * );


/*
 * Function: FindAccount()
 * Usage: *Account=*FindAccount(accountManage);
 * ------------------------------------------
 * This function provides an interface to find
 * an account by entering its ID and name.
 */
Account *FindAccount( AccountManage * );


/*
 * Function: AddFee()
 * Usage: AddFee(accountManage);
 * ------------------------------------------
 * This function provides an interface to Add Fee
 * to one account.
 */
void AddFee( AccountManage * );


/*
 * Function: PrintStateRoom()
 * Usage: PrintStateRoom(roomManage,roomState);
 * ------------------------------------------
 * This function prints all the rooms info 
 * in the one kind of states.
 */
void PrintStateRoom( RoomManage *, RoomState );


/*
 * Function: PrintRoomInfo()
 * Usage: PrintRoomInfo(roomManage);
 * ------------------------------------------
 * This function provides an interface to find
 * and print the room info in detail.
 */
void PrintRoomInfo( RoomManage * );


/*
 * Function: PrintAllRoom()
 * Usage: PrintAllRoom(roomManage);
 * ------------------------------------------
 * This function provides an interface to 
 * print all the rooms info briefly in a list.
 */
void PrintAllRoom( RoomManage * );


/*
 * Function: PrintAccountInfo()
 * Usage: PrintAccountInfo(accountManage);
 * ------------------------------------------
 * This function provides an interface to find
 * the account and print its info in detail.
 */
void PrintAccountInfo( AccountManage * );


/*
 * Function: PrintGuestInHotel()
 * Usage: PrintGuestInHotel(accountManage);
 * ------------------------------------------
 * This function provides an interface to print
 * all the accounts info in Hotel.
 */
void PrintGuestInHotel( AccountManage * );


/*
 * Function: PrintAllAccount()
 * Usage: PrintAllAccount(accountManage);
 * ------------------------------------------
 * This function provides an interface to print
 * all the accounts info briefly in a list.
 */
void PrintAllAccount( AccountManage * );


/*
 * Function: PrintNotEnoughAccount()
 * Usage: PrintNotEnoughAccount(accountManage);
 * ------------------------------------------
 * This function provides an interface to check
 * all accounts curExpences and list all the 
 * accounts which don't have enough...
 */
void PrintNotEnoughAccount( AccountManage * );


/*
 * Function: ChangeRoomState()
 * Usage: ChangeRoomState(roomManage);
 * ------------------------------------------
 * This function provides an interface to find 
 * a room and change its state.
 */
void ChangeRoomState( RoomManage * );


/*
 * Function: AddAccount()
 * Usage: AddAccount(accountManage);
 * ------------------------------------------
 * This function provides an interface to allow
 * user to create a new account,and add it to 
 * the allAccountList.
 */
void AddAccount( AccountManage * );


/*
 * Function: AddRoom()
 * Usage: AddRoom(roomManage);
 * ------------------------------------------
 * This function provides an interface to allow
 * user to create a new room,and add it to the
 * allRoomList.
 */
void AddRoom( RoomManage * );


/*
 * Function: DeleteAccount()
 * Usage: DeleteAccount(accountManage);
 * ------------------------------------------
 * This function provides an interface to find
 * the account and delete it.
 */
void DeleteAccount( AccountManage * );


/*
 * Function: DeleteRoom()
 * Usage: DeleteRoom(roomManage);
 * ------------------------------------------
 * This function provides an interface to find
 * a room and delete it.
 */
void DeleteRoom( RoomManage * );


/*
 * Function: ClearAccountManageInfo()
 * Usage: ClearAccountManageInfo(accountManage);
 * ------------------------------------------
 * This function empties the allAccountList.
 */
void ClearAccountManageInfo( AccountManage * );
void ClearRoomManageInfo( RoomManage * );


#endif

⌨️ 快捷键说明

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