12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #pragma once
- #include "DataBaseHolder.h"
- #include <vector>
- using namespace std;
- struct q_std{
- #define MAX_OPTION 10
- string question_code;
- int question_type;
- int mutil_answer;
- int rule_type;
- string answer_std;
- vector<string> answer_std_option;
- int option_count;
- float score_full;
- float score_half;
- bool is_case_score;
- map<string,float> case_score;
- string answer_all;
- };
- /************************************************************************/
- /* 分数统计类 */
- /************************************************************************/
- class CScoreCounter:public CDataBaseHolder
- {
- public:
- CScoreCounter(void);
- ~CScoreCounter(void);
- public:
- virtual void Load();
- float GetScore(const std::string &question_code,const std::string& answer ,const int isright,const float score);
- float GetScore_TianKongTi2(const std::string &question_code, const float score);
- float GetScore( q_std&question_std, const string & answer, float result, int isright, float score );
- q_std get_std(const std::string &question_code);
- private:
- std::map<std::string,q_std> q_stdm;
- };
- // 客观题异常防止同一套试题多次被加载
- class CScoreCounterEx : public CScoreCounter
- {
- public:
- CScoreCounterEx(void);
- ~CScoreCounterEx(void);
- public:
- virtual void Load();
- private:
- bool m_bload;
- };
|