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