upd: ready to lex the command
This commit is contained in:
@ -140,4 +140,21 @@ class OperationLogItemClass {
|
||||
char command[256];
|
||||
int fid;
|
||||
};
|
||||
|
||||
enum OperationType {
|
||||
__Ksu,
|
||||
__Klogout,
|
||||
__Kregister,
|
||||
__Kpasswd,
|
||||
__Kuseradd,
|
||||
__Kdelete,
|
||||
__Kshow,
|
||||
__Kbuy,
|
||||
__Kselect,
|
||||
__Kmodify,
|
||||
__Kimport,
|
||||
__Kshowfinance,
|
||||
__Klog,
|
||||
__Kreport,
|
||||
};
|
||||
#endif // PROTECTOR_UTILITY_H
|
@ -5,13 +5,14 @@
|
||||
#include <vector>
|
||||
|
||||
#include "database.h"
|
||||
#include "lexer.h"
|
||||
class BookStoreEngineClass {
|
||||
std::string config_dir;
|
||||
UserDataBase user_data_base;
|
||||
|
||||
bool is_server;
|
||||
public:
|
||||
BookStoreEngineClass() = delete;
|
||||
BookStoreEngineClass(std::string __config_dir);
|
||||
BookStoreEngineClass(std::string __config_dir, bool __is_server);
|
||||
std::vector<std::string> Execute(const std::string &cmd,
|
||||
std::stack<std::string> &login_stack);
|
||||
};
|
||||
|
10
backend/include/lexer.h
Normal file
10
backend/include/lexer.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef PROTECTOR_LEXER_H
|
||||
#define PROTECTOR_LEXER_H
|
||||
#include <regex>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
bool CommandShowLexer(const std::string &command, std::string &ISBN,
|
||||
std::string &name, std::string &author,
|
||||
std::string &keyword);
|
||||
#endif // PROTECTOR_LEXER_H
|
Reference in New Issue
Block a user