card.h 764 B

1234567891011121314151617181920212223242526272829
  1. #ifndef _CARD_HPP_
  2. #define _CARD_HPP_
  3. #include <thread>
  4. #include <ev++.h>
  5. #include "card_base.h"
  6. #include "write-copy.h"
  7. struct card_list_visit:visitor<std::shared_ptr<card_location_base>>
  8. {
  9. bool visit(std::shared_ptr<card_location_base> c);
  10. bool _flag{false};
  11. };
  12. struct card_list:single_base<card_list,uint64_t,std::shared_ptr<card_location_base>>
  13. {
  14. ///id64=-1为初始化所有卡, id格式为:10000001016
  15. void init_staffer(int64_t id64);
  16. void init_vehicle(int64_t id64);
  17. void on_message(zloop<task*> *loop,const message_locinfo&loc,bool is_history);
  18. void init_card_from_db();
  19. void load_his_card_postion_vehicle();
  20. void load_his_card_postion_staff();
  21. void load_his_card_postion_from_db();
  22. ~card_list(){}
  23. };
  24. #endif