Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / DevGuideExamples / Multithreading / GracefulShutdown / Messenger_i.cpp
blobc366adf61a8beaaeafe408d1378ce3a4418de318
1 /* -*- C++ -*- */
3 // ****** Code generated by the The ACE ORB (TAO) IDL Compiler *******
4 // TAO and the TAO IDL Compiler have been developed by the Center for
5 // Distributed Object Computing at Washington University, St. Louis.
6 //
7 // Information about TAO is available at:
8 // http://www.dre.vanderbilt.edu/~schmidt/TAO.html
10 #include "Messenger_i.h"
11 #include <iostream>
12 // Implementation skeleton constructor
13 Messenger_i::Messenger_i (CORBA::ORB_ptr orb)
14 : orb_(CORBA::ORB::_duplicate(orb))
18 // Implementation skeleton destructor
19 Messenger_i::~Messenger_i ()
23 CORBA::Boolean Messenger_i::send_message (
24 const char * user_name,
25 const char * subject,
26 char *& message
29 std::cout << "Message from: " << user_name << std::endl;
30 std::cout << "Subject: " << subject << std::endl;
31 std::cout << "Message: " << message << std::endl;
32 CORBA::string_free(message);
33 message = CORBA::string_dup("Thanks for the message.");
34 return true;
37 void Messenger_i::shutdown ()
39 orb_->shutdown(false);