Advertisement

boost::asio version 9: service registration

阅读量:

主要应用于service的注册过程,其中所涉及的注册密钥类型为execution_context::service::key:

复制代码
   friend class boost::asio::detail::service_registry;

    
   struct key
    
   {
    
     key() : type_info_(0), id_(0) {}
    
     const std::type_info* type_info_;
    
     const execution_context::id* id_;
    
   } key_;
    
    
    
    

以下为完整的代码实现:

复制代码
 class service_registry

    
   : private noncopyable
    
 {
    
 public:
    
   // Constructor.
    
   BOOST_ASIO_DECL service_registry(execution_context& owner);
    
  
    
   // Destructor.
    
   BOOST_ASIO_DECL ~service_registry();
    
  

全部评论 (0)

还没有任何评论哟~