Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tests / Bug_2935_Regression / middle_i.cpp
blobee83ce768383a7ef4331f1de5c7caa61803d7de5
1 #include "middle_i.h"
2 #include "ace/OS_NS_time.h"
3 #include "ace/OS_NS_string.h"
5 Middle_i::Middle_i (CORBA::ORB_ptr orb, ThreeTier_ptr target)
6 : orb_(CORBA::ORB::_duplicate (orb))
7 , target_(ThreeTier::_duplicate (target))
9 // ACE_DEBUG((LM_DEBUG, "Middle (%P|%t) Construct middle_i @%8.8x\n", this));
12 Middle_i::~Middle_i ()
17 bool
18 Middle_i::parse_args(int /*argc*/ , ACE_TCHAR* /*argv*/[] )
20 return true;
23 // Implement the tick method
25 void
26 Middle_i::tick ()
28 ACE_DEBUG((LM_DEBUG, "Middle (%P|%t) tick.\n"));
29 try
31 target_->tick();
33 catch (const CORBA::UserException& userex)
35 userex._tao_print_exception ("MIDDLE::tick User Exception in run");
37 catch (const CORBA::SystemException& sysex)
39 sysex._tao_print_exception ("MIDDLE::tick System Exception in run");
43 void
44 Middle_i::tock ()
46 ACE_DEBUG((LM_DEBUG, "Middle (%P|%t) tock.\n"));
47 try
49 target_->tock();
51 catch (const CORBA::UserException& userex)
53 userex._tao_print_exception ("MIDDLE::tock User Exception in run");
54 throw;
56 catch (const CORBA::SystemException& sysex)
58 sysex._tao_print_exception ("MIDDLE::tock System Exception in run");
59 throw;
63 ::CORBA::ULong
64 Middle_i::tickCount ()
66 ACE_DEBUG((LM_DEBUG, "Middle (%P|%t) tickCount.\n"));
67 try
69 return target_->tickCount();
71 catch (const CORBA::UserException& userex)
73 userex._tao_print_exception ("MIDDLE::tickCount User Exception in run");
74 throw;
76 catch (const CORBA::SystemException& sysex)
78 sysex._tao_print_exception ("MIDDLE::tickCount System Exception in run");
79 throw;
83 ::CORBA::ULong
84 Middle_i::tockCount ()
86 ACE_DEBUG((LM_DEBUG, "Middle (%P|%t) tockCount.\n"));
87 try
89 return target_->tockCount();
91 catch (const CORBA::UserException& userex)
93 userex._tao_print_exception ("MIDDLE::tockCount User Exception in run");
94 throw;
96 catch (const CORBA::SystemException& sysex)
98 sysex._tao_print_exception ("MIDDLE::tockCount System Exception in run");
99 throw;
104 // Shutdown.
106 void
107 Middle_i::shutdown ()
109 ACE_DEBUG((LM_DEBUG, "Middle (%P|%t) shutdown.\n"));
110 target_->shutdown();
111 ACE_DEBUG ((LM_DEBUG, "Middle_i is shutting down"));
113 // Instruct the ORB to shutdown.
114 this->orb_->shutdown (false);