#include #include class solid_ball_module{ public: std::shared_ptr get(const std::string& sid) { auto itc = m_card_list.find(sid); if(itc == m_card_list.end()) { return nullptr; } return itc->second; } int do_business(std::shared_ptr ptr_card); public: std::map> m_card_list; private: double get_distance(const point& p, const std::string& sid); }; //单件定义 using singleton_solid_ball_module = boost::serialization::singleton #define ssolid_ball_module singleton_solid_ball_module::get_mutable_instance()