Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / orbsvcs / tests / ImplRepo / PICurrent / Test_i.cpp
blobc1a7320f7d71c59e164426b618e3b888981f2de7
1 // ****** Code generated by the The ACE ORB (TAO) IDL Compiler *******
2 // TAO and the TAO IDL Compiler have been developed by the Center for
3 // Distributed Object Computing at Washington University, St. Louis.
4 //
5 // Information about TAO is available at:
6 // http://www.cs.wustl.edu/~schmidt/TAO.html
8 #include "Test_i.h"
9 #include "Terminator.h"
11 #include <iostream>
13 // Implementation skeleton constructor
14 Test_i::Test_i (Terminator &terminator)
15 : message_count_ (0)
16 , terminator_ (terminator)
20 // Implementation skeleton destructor
21 Test_i::~Test_i (void)
25 CORBA::Boolean
26 Test_i::send_message (const char * user_name,
27 const char * subject,
28 char *& message)
30 std::cout << "Message count: " << message_count_++ << std::endl;
31 std::cout << "Message from: " << user_name << std::endl
32 << "Subject: " << subject << std::endl
33 << "Message: " << message << std::endl;
34 if (message_count_ == 4)
36 ACE_Message_Block *mb = 0;
37 ACE_NEW_RETURN(mb, ACE_Message_Block(2), 0);
38 ACE_OS::sprintf(mb->wr_ptr (), "0");
39 terminator_.putq(mb);
41 return 1;