#include <Locator_Loader.h>
Inheritance diagram for ImR_Locator_Loader:
Public Member Functions | |
ImR_Locator_Loader () | |
virtual int | init (int argc, ACE_TCHAR *argv[]) |
virtual int | fini (void) |
virtual CORBA::Object_ptr | create_object (CORBA::ORB_ptr orb, int argc, ACE_TCHAR *argv[]) |
int | run (void) |
Private Member Functions | |
ImR_Locator_Loader (const ImR_Locator_Loader &) | |
ImR_Locator_Loader & | operator= (const ImR_Locator_Loader &) |
Private Attributes | |
ImR_Locator_i | service_ |
Options | opts_ |
ACE_Auto_Ptr< ImR_Locator_ORB_Runner > | runner_ |
Definition at line 20 of file Locator_Loader.h.
ImR_Locator_Loader::ImR_Locator_Loader | ( | ) |
ImR_Locator_Loader::ImR_Locator_Loader | ( | const ImR_Locator_Loader & | ) | [private] |
virtual CORBA::Object_ptr ImR_Locator_Loader::create_object | ( | CORBA::ORB_ptr | orb, | |
int | argc, | |||
ACE_TCHAR * | argv[] | |||
) | [virtual] |
Implements TAO_Object_Loader.
int ImR_Locator_Loader::fini | ( | void | ) | [virtual] |
Reimplemented from ACE_Shared_Object.
Definition at line 54 of file Locator_Loader.cpp.
References ACE_ASSERT, ImR_Locator_i::fini(), ACE_Auto_Basic_Ptr< X >::reset(), runner_, and service_.
00055 { 00056 ACE_ASSERT(this->runner_.get () != 0); 00057 try 00058 { 00059 int ret = this->service_.fini (); 00060 00061 this->runner_->wait (); 00062 this->runner_.reset (0); 00063 return ret; 00064 } 00065 catch (const CORBA::Exception&) 00066 { 00067 } 00068 return -1; 00069 }
int ImR_Locator_Loader::init | ( | int | argc, | |
ACE_TCHAR * | argv[] | |||
) | [virtual] |
Reimplemented from ACE_Shared_Object.
Definition at line 29 of file Locator_Loader.cpp.
References ACE_ASSERT, ImR_Locator_i::init(), Options::init(), opts_, ACE_Auto_Basic_Ptr< X >::reset(), runner_, and service_.
00030 { 00031 try 00032 { 00033 int err = this->opts_.init (argc, argv); 00034 if (err != 0) 00035 return -1; 00036 00037 err = this->service_.init (this->opts_); 00038 if (err != 0) 00039 return -1; 00040 00041 // Create a thread in which to run the service 00042 ACE_ASSERT(this->runner_.get () == 0); 00043 this->runner_.reset(new ImR_Locator_ORB_Runner (*this)); 00044 this->runner_->activate (); 00045 } 00046 catch (const CORBA::Exception&) 00047 { 00048 return -1; 00049 } 00050 return 0; 00051 }
ImR_Locator_Loader& ImR_Locator_Loader::operator= | ( | const ImR_Locator_Loader & | ) | [private] |
int ImR_Locator_Loader::run | ( | void | ) |
Definition at line 80 of file Locator_Loader.cpp.
References ACE_ERROR, LM_ERROR, ImR_Locator_i::run(), and service_.
Referenced by ImR_Locator_ORB_Runner::svc().
00081 { 00082 try 00083 { 00084 return this->service_.run (); 00085 } 00086 catch (...) 00087 { 00088 ACE_ERROR((LM_ERROR, "Exception in ImR_Locator_ORB_Runner ()\n")); 00089 return -1; 00090 } 00091 }
Options ImR_Locator_Loader::opts_ [private] |
ImR_Locator_i ImR_Locator_Loader::service_ [private] |