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


C++ TAO_OutputCDR::byte_order方法代码示例

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


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

示例1: switch

void
TAO_AMH_DSI_Response_Handler::gateway_exception_reply (
    CORBA::ULong reply_status,
    TAO_OutputCDR & encap)
{
  // for this to be effective, ACE & TAO must be built with
  // ACE_ENABLE_SWAP_ON_WRITE defined in ace/config.h
  this->_tao_out.reset_byte_order (encap.byte_order ());
  // This reply path handles only user exceptions.
  switch (reply_status)
    {
    case TAO_AMI_REPLY_USER_EXCEPTION:
      this->reply_status_ = GIOP::USER_EXCEPTION;
      break;
    case TAO_AMI_REPLY_SYSTEM_EXCEPTION:
      this->reply_status_ = GIOP::SYSTEM_EXCEPTION;
      break;

      // TODO: we don't handle location forward at this moment.
      // need to be addressed later.
      //
      //case TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD:
      //  this->exception_type_ = TAO_GIOP_LOCATION_FORWARD;
      //  break;
    }
  try
    {
      this->_tao_rh_init_reply ();

      // We know nothing about this exception, so we marshal it as a block
      // of bytes. The outgoing stream's byte order has already been matched
      // to the original source of the reply.
      this->_tao_out.write_char_array (encap.buffer (), encap.length ());
      // This will prevent the marshaling of any parameters into this reply.
      //  this->sent_gateway_exception_ = 1;
      this->_tao_rh_send_reply ();
    }
  catch (const CORBA::Exception &)
    {
      // TODO:
    }

}
开发者ID:asdlei00,项目名称:ACE,代码行数:43,代码来源:AMH_DSI_Response_Handler.cpp


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