1
0

area_business_count_checker.h 1.0 KB

123456789101112131415161718192021222324
  1. #ifndef _area_business_count_checker_hpp_
  2. #define _area_business_count_checker_hpp_
  3. #include "area_business.h"
  4. /*
  5. 判断当前区域a中的人数是否超过设定人数,超过后告警
  6. 区域内实时人数存储在area对象中,在当前类on_enter/on_leave中进行更新
  7. 整个井下的超员和某个区域的超员都使用这个代码
  8. */
  9. struct area_business_count_checker:area_business
  10. {
  11. //服务器重启加载数据
  12. void on_load_his(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data>&ptr);
  13. //增加计数,并进行判断
  14. void on_enter(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data>&ptr);
  15. void on_hover(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr);
  16. //减少计数
  17. void on_leave(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr);
  18. };
  19. #endif