1234567891011121314151617181920212223242526 |
- #include <tpm_common.h>
- #include <boost/serialization/singleton.hpp>
- class solid_ball_module{
- public:
- std::shared_ptr<sb_card> 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<sb_card> ptr_card);
- public:
- std::map<std::string, std::shared_ptr<sb_card>> m_card_list;
- private:
- double get_distance(const point& p, const std::string& sid);
- };
- //单件定义
- using singleton_solid_ball_module = boost::serialization::singleton<solid_ball_module>
- #define ssolid_ball_module singleton_solid_ball_module::get_mutable_instance()
|