parent
d16ce0ba4c
commit
ca0a2fb74f
@ -1,43 +0,0 @@
|
||||
#ifndef SESSION_MANAGER_H_
|
||||
#define SESSION_MANAGER_H_
|
||||
|
||||
#include <string>
|
||||
#include "question_generator.h"
|
||||
#include "primary_generator.h"
|
||||
#include "junior_generator.h"
|
||||
#include "senior_generator.h"
|
||||
|
||||
class SessionManager {
|
||||
public:
|
||||
SessionManager();
|
||||
|
||||
// 设置当前用户和难度
|
||||
void SetUser(const std::string& username, const std::string& difficulty);
|
||||
|
||||
// 切换难度级别
|
||||
bool SwitchDifficulty(const std::string& difficulty);
|
||||
|
||||
// 获取当前题目生成器
|
||||
QuestionGenerator* GetCurrentGenerator();
|
||||
|
||||
// 获取当前难度描述
|
||||
std::string GetCurrentDifficulty() const;
|
||||
|
||||
// 获取当前用户名
|
||||
std::string GetCurrentUser() const;
|
||||
|
||||
private:
|
||||
std::string current_user_;
|
||||
std::string current_difficulty_;
|
||||
QuestionGenerator* current_generator_;
|
||||
|
||||
PrimaryGenerator primary_generator_;
|
||||
JuniorGenerator junior_generator_;
|
||||
SeniorGenerator senior_generator_;
|
||||
|
||||
// 禁用拷贝构造和赋值操作
|
||||
SessionManager(const SessionManager&) = delete;
|
||||
SessionManager& operator=(const SessionManager&) = delete;
|
||||
};
|
||||
|
||||
#endif // SESSION_MANAGER_H_
|
||||
Loading…
Reference in new issue