rir_narrow.h

来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C头文件 代码 · 共 67 行

H
67
字号
// -*- C++ -*-
//=============================================================================
/**
 * @file RIR_Narrow.h
 *
 * RIR_Narrow.h,v 1.6 2003/07/21 23:51:39 dhinton Exp
 *
 * @author Carlos O'Ryan <coryan@atdesk.com>
 */
//=============================================================================
#ifndef TAO_UTILS_RIR_NARROW_H
#define TAO_UTILS_RIR_NARROW_H
#include /**/ "ace/pre.h"

#include "tao/ORB.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/PortableInterceptorC.h"


namespace TAO
{
  namespace Utils
  {

    /**
     * @class RIR_Narrow
     *
     * @brief Helper class to obtain an initial reference and narrow it
     *        to the proper object reference.
     */
    template<class T> class RIR_Narrow
    {
    public:
      typedef typename T::_ptr_type _ptr_type;
      typedef typename T::_var_type _var_type;

      /// Use resolve_initial_references to find an object and then
      /// narrow it.
      static _ptr_type narrow (CORBA::ORB_ptr orb,
                               char const * id
                               ACE_ENV_ARG_DECL_WITH_DEFAULTS);

      /// Use resolve_initial_references to find an object and then
      /// narrow it.
      static _ptr_type narrow (PortableInterceptor::ORBInitInfo_ptr orb,
                               char const * id
                               ACE_ENV_ARG_DECL_WITH_DEFAULTS);

    private:
      static _ptr_type narrow_object (CORBA::Object_ptr object
                                      ACE_ENV_ARG_DECL_WITH_DEFAULTS);
    };

  } // namespace Utils
} // namespace TAO

#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
# include "RIR_Narrow.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */

#include /**/ "ace/post.h"
#endif /*TAO_UTILS_RIR_NARROW_H*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?