1234567891011121314151617181920212223242526272829303132333435 |
- #ifndef _CARD_HPP_
- #define _CARD_HPP_
- #include <thread>
- #include <ev++.h>
- #include "card_base.h"
- #include "write-copy.h"
- extern int three_rates_flag;
- extern int traffic_light_flag;
- struct card_list_visit:visitor<std::shared_ptr<card_location_base>>
- {
- bool visit(std::shared_ptr<card_location_base> c);
- bool _flag{false};
- };
- struct card_list:single_base<card_list,uint64_t,std::shared_ptr<card_location_base>>
- {
- ///lszId64=为初始化所有卡, lszId64格式为:0010000001016
- void init_staffer(const std::string & lszId64);
- void init_vehicle(const std::string & lszId64);
- void on_message(zloop<task*> *loop,message_locinfo&loc,bool is_history);
- void on_message(zloop<task*> *loop, message_tdoa_locinfo& loc, bool is_history);
- void on_message(zloop<task*> *loop, message_pdoa_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();
- //获取卡数据 //标识id 人staff_id 车 vehicle_id
- const std::shared_ptr<card_location_base> get_card_by_cid(int cid);
- ~card_list(){}
- };
- #endif
|