writing book system
This commit is contained in:
@ -23,16 +23,19 @@ class UserDataBase {
|
||||
};
|
||||
class BookDataBase {
|
||||
DriveArray<BookItemClass> full_book_data;
|
||||
String2Index indexer;
|
||||
String2Index ISBN2index, name2index, author2index, keyword2index;
|
||||
|
||||
public:
|
||||
void Open(std::string file_name);
|
||||
bool HaveISBN(const std::string &ISBN);
|
||||
void CreateEmptyBook(const std::string &ISBN);
|
||||
void QueryBook(const std::string &ISBN, const std::string &name,
|
||||
const std::string &author, const std::string &keyword,
|
||||
std::vector<BookItemClass> &ret);
|
||||
void ModifyInfo(const std::string &ISBN,const std::string &new_ISBN, const std::string &name,
|
||||
const std::string &author, const std::string &keyword,
|
||||
double price);
|
||||
void ModifyInfo(const std::string &ISBN, const std::string &new_ISBN,
|
||||
const std::string &name, const std::string &author,
|
||||
const std::string &keyword, double price,
|
||||
int quantity_remain);
|
||||
};
|
||||
class LogDataBase {
|
||||
DriveArray<FinanceItemClass> finance_data;
|
||||
|
@ -27,4 +27,5 @@ bool CommandModifyLexer(const std::string &command, std::string &ISBN,
|
||||
bool CommandImportLexer(const std::string &command, int &quantity,
|
||||
double &total_cost);
|
||||
bool CommandShowfinanceLexer(const std::string &command,int &count);
|
||||
bool KeyWordSpliter(const std::string &keyword, std::vector<std::string> &words);
|
||||
#endif // PROTECTOR_LEXER_H
|
Reference in New Issue
Block a user