1234567891011121314151617181920212223242526272829 |
- #pragma once
- #include <boost/smart_ptr.hpp>
- #include "../sqlite/CppSQLite3.h"
- class CBatch;
- class CBatchManager
- {
- template<class T> friend class boost::shared_ptr;
- template<class T> friend inline void boost::checked_delete(T *);
- public:
- static boost::shared_ptr<CBatchManager> Get();
- public:
- void initalize(bool bOnlineCard, int subjectid, int nOnlineScanType);
- boost::shared_ptr<CBatch>& createNewBatch();
- boost::shared_ptr<CBatch>& GetCurrentBatch();
- int GiveUpCurrentBatch();
- int leaveCurrentBatch();
- private:
- CBatchManager();
- ~CBatchManager();
- private:
- boost::shared_ptr<CBatch> currentBatch;
- CppSQLite3DB database_db;
- RTL_CRITICAL_SECTION database_db_lock;
- bool m_bOnlineCard; // ê?·?ê??ú??′eìa?¨?£ê?
- int m_nSubjectID;
- int m_nOnlineScanType; //参数说明:-1 代表原理的在线答题卡扫描 0:代表英语魔法词汇宝扫描
- };
|