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


C++ ORBInitInfo_ptr::codec_factory方法代码示例

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


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

示例1: ClientInterceptor

void
ClientInitializer::post_init (
                              PortableInterceptor::ORBInitInfo_ptr info
                              )
{

  // get Codec factory
  IOP::CodecFactory_var codec_factory = info->codec_factory();

  // Create and register the request interceptors.
  PortableInterceptor::ClientRequestInterceptor_ptr ci =
    PortableInterceptor::ClientRequestInterceptor::_nil ();

  try
    {
      ci = new ClientInterceptor (codec_factory);
    }
  catch(...)
    {
      std::cerr << "Exception occurred trying to create ClientInterceptor." << std::endl;
    }

  PortableInterceptor::ClientRequestInterceptor_var ci_interceptor =
    ci;

  info->add_client_request_interceptor (ci_interceptor.in ());
}
开发者ID:INMarkus,项目名称:ATCD,代码行数:27,代码来源:ClientInitializer.cpp

示例2:

void
FOO_IORInterceptor_ORBInitializer::post_init (
    PortableInterceptor::ORBInitInfo_ptr info)
{
  IOP::CodecFactory_var codec_factory =
    info->codec_factory ();

  // Set up a structure that contains information necessary to
  // create a GIOP 1.2 CDR encapsulation Codec.
  IOP::Encoding encoding;
  encoding.format = IOP::ENCODING_CDR_ENCAPS;
  encoding.major_version = 1;
  encoding.minor_version = 2;

  // Obtain the CDR encapsulation Codec.
  IOP::Codec_var codec =
    codec_factory->create_codec (encoding);

  PortableInterceptor::IORInterceptor_ptr foo;
  ACE_NEW_THROW_EX (foo,
                    FOO_IORInterceptor (codec.in ()),
                    CORBA::NO_MEMORY (
                      CORBA::SystemException::_tao_minor_code (
                        TAO::VMCID,
                        ENOMEM),
                      CORBA::COMPLETED_NO));

  PortableInterceptor::IORInterceptor_var ior_interceptor =
    foo;

  info->add_ior_interceptor (ior_interceptor.in ());
}
开发者ID:manut,项目名称:TAO,代码行数:32,代码来源:FOO_IORInterceptor_ORBInitializer.cpp

示例3: ClientInterceptor

void
ClientInitializer::post_init (PortableInterceptor::ORBInitInfo_ptr info)
{
  // get Codec factory
  IOP::CodecFactory_var codec_factory = info->codec_factory();

  // Create and register the request interceptors.
  PortableInterceptor::ClientRequestInterceptor_var ci =
    new ClientInterceptor (codec_factory);
  info->add_client_request_interceptor (ci.in());
}
开发者ID:DOCGroup,项目名称:ACE_TAO,代码行数:11,代码来源:ClientInitializer.cpp

示例4: ServerInterceptor

void
ServerInitializer::post_init (
                              PortableInterceptor::ORBInitInfo_ptr info)
{
  // get reference to the codec_factory
  IOP::CodecFactory_var codec_factory = info->codec_factory();

  // Create and register the request interceptors.
  PortableInterceptor::ServerRequestInterceptor_var si =
    new ServerInterceptor (codec_factory);
  info->add_server_request_interceptor (si.in());

  // add IOR Interceptor
  PortableInterceptor::IORInterceptor_var iori = new ServerIORInterceptor;
  info->add_ior_interceptor (iori.in());
}
开发者ID:DOCGroup,项目名称:ACE_TAO,代码行数:16,代码来源:ServerInitializer.cpp


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