// // Created by songchao.chen on 2019/7/4. // 区域中设定时间段人员超时限制 // #ifndef WORKSPACE_AREA_PERSONS_THRE_TIME_H #define WORKSPACE_AREA_PERSONS_THRE_TIME_H #include #include #include struct SArea_Persons_Thre { int db_id; int area_id; int thre_value; std::string sz_start_time; std::string sz_end_time; int start_time; int end_time; SArea_Persons_Thre() { db_id = 0; area_id = 0; thre_value = 0; start_time = 0; end_time = 0; sz_start_time = ""; sz_end_time = ""; } }; typedef std::map MAP_AREA_PERSONS_THRE; struct area_persons_thre_time { area_persons_thre_time(); MAP_AREA_PERSONS_THRE m_area_persons_thre; int m_default_limit_person_limit; void add_persons_thre(const SArea_Persons_Thre & thre); void del_persons_thre(int thre_db_id); void clear_persons_thre(); //设置默认值 void set_default_person_count_limit(int _limit); //记录数量 int get_count() const; // 获取区域cur_time超员的阈值,区域可能有时间段限制 int get_limit_person_count(uint64_t cur_time = 0); }; #endif //WORKSPACE_AREA_PERSONS_THRE_TIME_H