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


C++ ACE_NEW_NORETURN函数代码示例

本文整理汇总了C++中ACE_NEW_NORETURN函数的典型用法代码示例。如果您正苦于以下问题:C++ ACE_NEW_NORETURN函数的具体用法?C++ ACE_NEW_NORETURN怎么用?C++ ACE_NEW_NORETURN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: proactor

void AIO_Input_Handler::open
  (ACE_HANDLE new_handle, ACE_Message_Block &) {
  reader_.open (*this, new_handle, 0, proactor ());
  ACE_NEW_NORETURN
    (mblk_, ACE_Message_Block (ACE_DEFAULT_CDR_BUFSIZE));
  // Align the Message Block for a CDR stream
  ACE_CDR::mb_align (mblk_);
  reader_.read (*mblk_, LOG_HEADER_SIZE);
}
开发者ID:DOCGroup,项目名称:ACE_TAO,代码行数:9,代码来源:AIO_Client_Logging_Daemon.cpp


示例2: ACE_DEBUG

//***************************************************************************
//
//    Method:          handle_read_file
//
//    Description:   Callback used when a read completes
//
// Inputs:        read file result structure containing message block
//
// Returns:       none
//
//***************************************************************************
void
FileIOHandler::handle_read_file(const ACE_Asynch_Read_File::Result &result)
{
  ACE_Message_Block &mb = result.message_block();
  // If the read failed, queue up another one using the same message block
  if (!result.success() || result.bytes_transferred() == 0)
  {
    //ACE_DEBUG((LM_INFO, ACE_TEXT("FileIOHandler receive timeout.\n")));
    reader_.read(mb,
                 mb.space(),
                 result.offset () + result.bytes_transferred ());
  }
  else
  {
    // We have a message block with some read data in it. Send it onward
    ACE_DEBUG((LM_INFO, ACE_TEXT("FileIOHandler received %d bytes of data at offset %d\n"),
                        result.bytes_transferred(), result.offset ()));

    // TODO: Process this data in some meaningful way
    if (result.offset () != (unsigned long)*reinterpret_cast<unsigned char*> (mb.rd_ptr ()))
    {
      ACE_DEBUG((LM_ERROR, ACE_TEXT("FileIOHandler received incorrect data: got [%u] expected [%u]\n"),
                           *reinterpret_cast<unsigned char*> (mb.rd_ptr ()), result.offset ()));
    }

    // Release the message block when we're done with it
    mb.release();

    if ((result.offset () + result.bytes_transferred ()) < 256)
    {
      // Our processing is done; prime the read process again
      ACE_Message_Block *new_mb;
      ACE_NEW_NORETURN(new_mb, ACE_Message_Block(FILE_FRAME_SIZE));
      if (reader_.read(*new_mb, new_mb->space(),
                       result.offset () + result.bytes_transferred ()) != 0)
      {
        int errnr = ACE_OS::last_error ();
        ACE_DEBUG(
            (LM_INFO, ACE_TEXT("%p [%d]\n"), ACE_TEXT("FileIOHandler continuing read failed"), errnr));
        new_mb->release();
#if defined (ACE_WIN32)
        this->read_pending_ = false;
      }
      else
      {
        this->read_pending_ = true;
#endif
      }
    }
    else
    {
      // we have it all; stop the proactor
      ACE_Proactor::instance ()->proactor_end_event_loop ();
    }
  }
}
开发者ID:esohns,项目名称:ATCD,代码行数:67,代码来源:Proactor_File_Test.cpp


示例3: RPG_TRACE

bool
RPG_Net_Protocol_Module_IRCSplitter::putStatisticsMessage (const RPG_Net_Protocol_RuntimeStatistic& info_in,
                                                           const ACE_Time_Value& collectionTime_in) const
{
  RPG_TRACE (ACE_TEXT ("RPG_Net_Protocol_Module_IRCSplitter::putStatisticsMessage"));

  // step1: initialize session data
  RPG_Net_Protocol_SessionData* data_p = NULL;
  ACE_NEW_NORETURN (data_p,
                    RPG_Net_Protocol_SessionData);
  if (!data_p)
  {
    ACE_DEBUG ((LM_CRITICAL,
                ACE_TEXT ("failed to allocate memory: \"%m\", aborting\n")));
    return false;
  } // end IF
  //ACE_OS::memset (data_p, 0, sizeof (RPG_Net_Protocol_SessionData));
  data_p->currentStatistics = info_in;
  data_p->lastCollectionTimestamp = collectionTime_in;

  // step2: allocate session data container
  RPG_Net_Protocol_StreamSessionData_t* session_data_p = NULL;
  ACE_NEW_NORETURN (session_data_p,
                    RPG_Net_Protocol_StreamSessionData_t (data_p,
                                                          true));
  if (!session_data_p)
  {
    ACE_DEBUG ((LM_CRITICAL,
                ACE_TEXT ("failed to allocate memory: \"%m\", aborting\n")));

    // clean up
    delete data_p;

    return false;
  } // end IF

  // step3: send the data downstream...
  // *NOTE*: "fire-and-forget"-API for session_data_p
  ACE_ASSERT (inherited::state_);
  return inherited::putSessionMessage (SESSION_STATISTICS,
                                       session_data_p,
                                       inherited::allocator_);
}
开发者ID:bhutnath,项目名称:yarp,代码行数:43,代码来源:rpg_net_protocol_module_IRCsplitter.cpp


示例4: ACE_NEW_NORETURN

void ProactorService::PostRecv()
{
	ACE_Message_Block* pBlock;

	ACE_NEW_NORETURN(pBlock, ACE_Message_Block (2048));
	if(this->m_AsyncReader.read(*pBlock, pBlock->space()) != 0)
	{
		pBlock->release();
		ReserveClose();
	}
}
开发者ID:codemaru,项目名称:CGSF,代码行数:11,代码来源:ProactorService.cpp


示例5: create_VTopics_Sender_Impl

  extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
  create_VTopics_Sender_Impl (void)
  {
    ::Components::EnterpriseComponent_ptr retval =
      ::Components::EnterpriseComponent::_nil ();
    ACE_NEW_NORETURN (
      retval,
      Sender_exec_i);

    return retval;
  }
开发者ID:CCJY,项目名称:ATCD,代码行数:11,代码来源:VTopics_Sender_exec.cpp


示例6: create_InterInArgsT_Sender_Impl

  extern "C" INTERINARGS_T_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
  create_InterInArgsT_Sender_Impl (void)
  {
    ::Components::EnterpriseComponent_ptr retval =
      ::Components::EnterpriseComponent::_nil ();

    ACE_NEW_NORETURN (
      retval,
      Sender_exec_i);

    return retval;
  }
开发者ID:CCJY,项目名称:ATCD,代码行数:12,代码来源:InterInArgsT_Sender_exec.cpp


示例7: ACE_TRACE

template <ACE_SYNCH_DECL, class TIME_POLICY> int
ACE_Stream<ACE_SYNCH_USE, TIME_POLICY>::control (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd,
                                    void *a)
{
  ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE, TIME_POLICY>::control");
  ACE_IO_Cntl_Msg ioc (cmd);

  ACE_Message_Block *db = 0;

  // Try to create a data block that contains the user-supplied data.
  ACE_NEW_RETURN (db,
                  ACE_Message_Block (sizeof (int),
                                     ACE_Message_Block::MB_IOCTL,
                                     0,
                                     (char *) a),
                  -1);
  // Try to create a control block <cb> that contains the control
  // field and a pointer to the data block <db> in <cb>'s continuation
  // field.
  ACE_Message_Block *cb = 0;

  ACE_NEW_NORETURN (cb,
                    ACE_Message_Block (sizeof ioc,
                                       ACE_Message_Block::MB_IOCTL,
                                       db,
                                       (char *) &ioc));
  // @@ Michael: The old semantic assumed that cb returns == 0
  //             if no memory was available. We will now return immediately
  //             without release (errno is set to ENOMEM by the macro).

  // If we can't allocate <cb> then we need to delete db and return
  // -1.
  if (cb == 0)
    {
      db->release ();
      errno = ENOMEM;
      return -1;
    }

  int result;

  if (this->stream_head_->writer ()->put (cb) == -1)
    result = -1;
  else if (this->stream_head_->reader ()->getq (cb) == -1)
    result = -1;
  else
    result = ((ACE_IO_Cntl_Msg *) cb->rd_ptr ())->rval ();

  // This will also release db if it's reference count == 0.
  cb->release ();

  return result;
}
开发者ID:Adeer,项目名称:OregonCore,代码行数:53,代码来源:Stream.cpp


示例8: create_Shapes_Controller_Impl

  extern "C" CONTROLLER_EXEC_Export ::Components::EnterpriseComponent_ptr
  create_Shapes_Controller_Impl (void)
  {
    ::Components::EnterpriseComponent_ptr retval =
      ::Components::EnterpriseComponent::_nil ();

    ACE_NEW_NORETURN (
      retval,
      Controller_exec_i);

    return retval;
  }
开发者ID:Yijtx,项目名称:ACE,代码行数:12,代码来源:Shapes_Controller_exec.cpp


示例9: create_Hello_Sender_comp_Impl

  extern "C" HELLO_SENDER_COMP_EXEC_Export ::Components::EnterpriseComponent_ptr
  create_Hello_Sender_comp_Impl (void)
  {
    ::Components::EnterpriseComponent_ptr retval =
      ::Components::EnterpriseComponent::_nil ();

    ACE_NEW_NORETURN (
      retval,
      Sender_comp_exec_i);

    return retval;
  }
开发者ID:bbidulock,项目名称:Middleware,代码行数:12,代码来源:Hello_Sender_comp_exec.cpp


示例10: create_Launch_Failure_Home_Impl

  extern "C" LAUNCH_FAILURE_EXEC_Export ::Components::HomeExecutorBase_ptr
  create_Launch_Failure_Home_Impl (void)
  {
    ::Components::HomeExecutorBase_ptr retval =
      ::Components::HomeExecutorBase::_nil ();

    ACE_NEW_NORETURN (
      retval,
      Launch_Failure_Home_exec_i);

    return retval;
  }
开发者ID:CCJY,项目名称:ATCD,代码行数:12,代码来源:Launch_Failure_exec.cpp


示例11: create_Shapes_Receiver_comp_Impl

extern "C" SHAPES_RECEIVER_COMP_EXEC_Export ::Components::EnterpriseComponent_ptr
create_Shapes_Receiver_comp_Impl (void)
{
    ::Components::EnterpriseComponent_ptr retval =
        ::Components::EnterpriseComponent::_nil ();

    ACE_NEW_NORETURN (
        retval,
        Receiver_comp_exec_i);

    return retval;
}
开发者ID:svn2github,项目名称:ACE-Middleware,代码行数:12,代码来源:Shapes_Receiver_comp_exec.cpp


示例12: create_DelReplyH_Receiver_Impl

  extern "C"  ::Components::EnterpriseComponent_ptr
  create_DelReplyH_Receiver_Impl (void)
  {
    ::Components::EnterpriseComponent_ptr retval =
      ::Components::EnterpriseComponent::_nil ();

    ACE_NEW_NORETURN (
      retval,
      Receiver_exec_i);

    return retval;
  }
开发者ID:Yijtx,项目名称:ACE,代码行数:12,代码来源:DelReplyH_Receiver_exec.cpp


示例13: create_UsesMulti_Sender_Impl

  extern "C" USESMULTI_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
  create_UsesMulti_Sender_Impl (void)
  {
    ::Components::EnterpriseComponent_ptr retval =
      ::Components::EnterpriseComponent::_nil ();

    ACE_NEW_NORETURN (
      retval,
      Sender_exec_i);

    return retval;
  }
开发者ID:Yijtx,项目名称:ACE,代码行数:12,代码来源:UsesMulti_Sender_exec.cpp


示例14: create_MLD_TypeRegistration_Test_CFTTestComponent_Impl

  extern "C" COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr
  create_MLD_TypeRegistration_Test_CFTTestComponent_Impl (void)
  {
    ::Components::EnterpriseComponent_ptr retval =
      ::Components::EnterpriseComponent::_nil ();

    ACE_NEW_NORETURN (
      retval,
      CFTTestComponent_exec_i);

    return retval;
  }
开发者ID:DOCGroup,项目名称:CIAO,代码行数:12,代码来源:TypeRegistration_Test_Component_exec.cpp


示例15: create_Launch_Failure_Impl

  extern "C" LAUNCH_FAILURE_EXEC_Export ::Components::EnterpriseComponent_ptr
  create_Launch_Failure_Impl (void)
  {
    ::Components::EnterpriseComponent_ptr retval =
      ::Components::EnterpriseComponent::_nil ();

    ACE_NEW_NORETURN (
      retval,
      Launch_Failure_exec_i);

    return retval;
  }
开发者ID:CCJY,项目名称:ATCD,代码行数:12,代码来源:Launch_Failure_exec.cpp


示例16: create_InterMulti_Receiver_Impl

  extern "C" INTERMULTI_RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
  create_InterMulti_Receiver_Impl (void)
  {
    ::Components::EnterpriseComponent_ptr retval =
      ::Components::EnterpriseComponent::_nil ();

    ACE_NEW_NORETURN (
      retval,
      Receiver_exec_i);

    return retval;
  }
开发者ID:DOCGroup,项目名称:CIAO,代码行数:12,代码来源:InterMulti_Receiver_exec.cpp


示例17: create_ConnHome_Impl

  extern "C" HOMET_HOMEC_EXEC_Export ::Components::HomeExecutorBase_ptr
  create_ConnHome_Impl (void)
  {
    ::Components::HomeExecutorBase_ptr retval =
      ::Components::HomeExecutorBase::_nil ();

    ACE_NEW_NORETURN (
      retval,
      ConnHome_exec_i);

    return retval;
  }
开发者ID:DOCGroup,项目名称:CIAO,代码行数:12,代码来源:HomeT_HomeC_exec.cpp


示例18: create_DDS_Pub_Impl

  extern "C" DDS_PUB_EXEC_Export ::Components::EnterpriseComponent_ptr
  create_DDS_Pub_Impl (void)
  {
    ::Components::EnterpriseComponent_ptr retval =
      ::Components::EnterpriseComponent::_nil ();

    ACE_NEW_NORETURN (
      retval,
      DDS_Pub_exec_i);

    return retval;
  }
开发者ID:DOCGroup,项目名称:CIAO,代码行数:12,代码来源:DDS_Pub_exec.cpp


示例19: create_PartialShutdown_Component1_Impl

  extern "C" COMPONENT1_EXEC_Export ::Components::EnterpriseComponent_ptr
  create_PartialShutdown_Component1_Impl (void)
  {
    ::Components::EnterpriseComponent_ptr retval =
      ::Components::EnterpriseComponent::_nil ();

    ACE_NEW_NORETURN (
      retval,
      Component1_exec_i);

    return retval;
  }
开发者ID:bbidulock,项目名称:Middleware,代码行数:12,代码来源:Component1_exec.cpp


示例20: create_Foo_Impl

  extern "C" FOO_EXEC_Export ::Components::EnterpriseComponent_ptr
  create_Foo_Impl (void)
  {
    ::Components::EnterpriseComponent_ptr retval =
      ::Components::EnterpriseComponent::_nil ();

    ACE_NEW_NORETURN (
      retval,
      Foo_exec_i);

    return retval;
  }
开发者ID:ddcelf,项目名称:ACE,代码行数:12,代码来源:Foo_exec.cpp



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