messenger_i.cpp

来自「在使用ACE的多线程编程过程中用于测试的一段实例代码。」· C++ 代码 · 共 42 行

CPP
42
字号
/* -*- C++ -*- $Id: Messenger_i.cpp,v 1.1.4.2 2005/09/22 20:51:54 cleeland Exp $ */

// ******  Code generated by the The ACE ORB (TAO) IDL Compiler *******
// TAO and the TAO IDL Compiler have been developed by the Center for
// Distributed Object Computing at Washington University, St. Louis.
//
// Information about TAO is available at:
//                 http://www.cs.wustl.edu/~schmidt/TAO.html

#include "Messenger_i.h"
#include <ace/Thread.h>
#include <iostream>

#include <sstream>

// Implementation skeleton constructor
Messenger_i::Messenger_i (void)
{
}
  
// Implementation skeleton destructor
Messenger_i::~Messenger_i (void)
{
}
  
CORBA::Boolean Messenger_i::send_message (
    const char* /*user_name*/,
    const char* /*subject*/,
    char *& message
  )
  throw(CORBA::SystemException)

{
  CORBA::string_free(message);

  std::ostringstream ostr;
  ostr << "Message handled on thread " << ACE_Thread::self();
  message = CORBA::string_dup(ostr.str().c_str());
  return 1;
}
  

⌨️ 快捷键说明

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