Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / NestedUpcall / Triangle_Test / Object_A_i.cpp
blob787932e6aedfeb5038e9b34b8bf54a28163785f0
2 //=============================================================================
3 /**
4 * @file Object_A_i.cpp
6 * This class implements the Object A of the
7 * Nested Upcalls - Triangle test.
9 * @author Michael Kircher
11 //=============================================================================
14 #include "Object_A_i.h"
15 #include "tao/ORB_Core.h"
16 #include "ace/Reactor.h"
18 // CTOR
19 Object_A_i::Object_A_i (void)
20 : finish_two_way_call_ (0)
24 // DTOR
25 Object_A_i::~Object_A_i (void)
31 void
32 Object_A_i::foo (Initiator_ptr theInitiator_ptr)
34 try
36 theInitiator_ptr->foo_object_B ();
38 while (!this->finish_two_way_call_)
39 TAO_ORB_Core_instance ()->reactor ()->handle_events ();
41 catch (const CORBA::Exception& ex)
43 ex._tao_print_exception ("calling the initiator");
48 void
49 Object_A_i::finish (void)
51 this->finish_two_way_call_ = 1;
55 void
56 Object_A_i::shutdown (void)
58 int argc = 0;
59 ACE_TCHAR **argv = 0;
60 CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
62 orb->shutdown ();