123456789101112131415161718192021222324252627282930 |
- #ifndef _CARD_HPP_
- #define _CARD_HPP_
- #include <thread>
- #include <ev++.h>
- #include "card_base.h"
- #include "write-copy.h"
- struct card_list:single_base<card_list,uint64_t,std::shared_ptr<card_location_base>>
- {
- ///id64=-1为初始化所有卡, id格式为:10000001016
- void init_staffer(int64_t id64);
- void init_vehicle(int64_t id64);
- void on_message(zloop<task*> *loop,const message_locinfo&loc,bool is_history);
- void init_card_from_db();
- void load_his_card_postion_vehicle();
- void load_his_card_postion_staff();
- void load_his_card_postion_from_db();
- std::unique_ptr<std::thread> m_pThread;
- bool m_bflag=false;
- void run()
- {
- m_pThread.reset(new std::thread(std::bind(&card_list::onTimer,this)));
- }
- void onTimer();
- ~card_list(){m_bflag=true;}
- };
- #endif
|