#ifndef __MINE__BUSINESS__HPP__
#define __MINE__BUSINESS__HPP__
#include <atomic>
#include <ctime>
#include <memory>
#include "point.h"
class staffer_num_business;
class reverse_alarm_business;
class rear_end_collision_prevented_business;
class card_location_base;
struct mine_business
{
	static mine_business *inst();
	void run_business();
//人员数量曲线功能
	void fetch_add();
//天线反向功能
	void load();
	void make_reverse_condition(uint64_t type,uint32_t id,int32_t antid,uint32_t ct,uint64_t tof,uint32_t sid);
//车辆防追尾告警
	void put(const std::shared_ptr<card_location_base>&);
	void make_arg(uint64_t cid,const point &p,uint64_t t);
private:
	mine_business();
	void handle_reverse_alarm();
	void record_staffer_num();
	void handle_rear_end();
	std::unique_ptr<staffer_num_business> m_staffer_num_ptr;
	std::unique_ptr<reverse_alarm_business> m_reverse_alarm_ptr;
	std::unique_ptr<rear_end_collision_prevented_business> m_rear_ended_ptr;
};
#endif
