11#include " orbsvcs/Log_Macros.h"
22#include " Activator_Loader.h"
3+ #include " Activator_ORB_Runner.h"
34#include " ace/Dynamic_Service.h"
4- #include " ace/Task.h"
55
6- class ImR_Activator_ORB_Runner : public ACE_Task_Base
7- {
8- ImR_Activator_Loader& service_;
9- public:
10- ImR_Activator_ORB_Runner (ImR_Activator_Loader& service)
11- : service_ (service)
12- {
13- }
14- virtual int svc ()
15- {
16- // Block until service_.fini() calls orb->destroy()
17- this ->service_ .run ();
18- return 0 ;
19- }
20- };
21-
22- ImR_Activator_Loader::ImR_Activator_Loader ()
6+ ImR_Activator_Loader::~ImR_Activator_Loader ()
237{
248}
259
@@ -45,7 +29,7 @@ ImR_Activator_Loader::init (int argc, ACE_TCHAR *argv[])
4529
4630 // Create a thread in which to run the service
4731 ACE_ASSERT (this ->runner_ .get () == 0 );
48- this ->runner_ . reset ( new ImR_Activator_ORB_Runner (*this ) );
32+ this ->runner_ = std::make_unique< ImR_Activator_ORB_Runner> (*this );
4933 this ->runner_ ->activate ();
5034 }
5135 catch (const CORBA::Exception&)
@@ -64,7 +48,7 @@ ImR_Activator_Loader::fini ()
6448 int ret = this ->service_ .fini ();
6549
6650 this ->runner_ ->wait ();
67- this ->runner_ .reset (0 );
51+ this ->runner_ .reset (nullptr );
6852 return ret;
6953 }
7054 catch (const CORBA::Exception&)
@@ -75,8 +59,8 @@ ImR_Activator_Loader::fini ()
7559
7660CORBA::Object_ptr
7761ImR_Activator_Loader::create_object (CORBA::ORB_ptr,
78- int ,
79- ACE_TCHAR **)
62+ int ,
63+ ACE_TCHAR **)
8064{
8165 throw CORBA::NO_IMPLEMENT ();
8266}
0 commit comments