当前位置: 首页>>代码示例>>C++>>正文


C++ Servant::_interface_repository_id方法代码示例

本文整理汇总了C++中portableserver::Servant::_interface_repository_id方法的典型用法代码示例。如果您正苦于以下问题:C++ Servant::_interface_repository_id方法的具体用法?C++ Servant::_interface_repository_id怎么用?C++ Servant::_interface_repository_id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在portableserver::Servant的用法示例。


在下文中一共展示了Servant::_interface_repository_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

    CORBA::Object_ptr
    ServantRetentionStrategyRetain::servant_to_reference (
      PortableServer::Servant servant)
    {
      // Note: The allocation of an Object Id value and installation in
      // the Active Object Map caused by implicit activation may actually
      // be deferred until an attempt is made to externalize the
      // reference. The real requirement here is that a reference is
      // produced that will behave appropriately (that is, yield a
      // consistent Object Id value when asked politely).
      CORBA::Short priority = this->poa_->server_priority ();

      PortableServer::ObjectId_var system_id =
        this->servant_to_system_id_i (servant, priority);

      PortableServer::ObjectId user_id;

      // This operation requires the RETAIN, therefore don't worry about
      // the NON_RETAIN case.
      if (this->active_object_map_->
          find_user_id_using_system_id (system_id.in (), user_id) != 0)
        {
          throw ::CORBA::OBJ_ADAPTER ();
        }

      // Remember params for potentially invoking <key_to_object> later.
      this->poa_->key_to_object_params_.set (
        system_id,
        servant->_interface_repository_id (),
        servant,
        1,
        priority,
        true);

      // Ask the ORT to create the object.
      // @@NOTE:There is a possible deadlock lurking here. We held the
      // lock, and we are possibly trying to make a call into the
      // application code. Think what would happen if the app calls us
      // back. We need to get to this at some point.
      return this->poa_->invoke_key_to_object_helper_i (
              servant->_interface_repository_id (), user_id);
    }
开发者ID:OspreyHub,项目名称:ATCD,代码行数:42,代码来源:ServantRetentionStrategyRetain.cpp


注:本文中的portableserver::Servant::_interface_repository_id方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。