diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-01-27 22:58:21 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-01-27 22:58:21 +0000 |
commit | 585ab5ba3e9c00214b20f5d18b2d6f4f2dacb453 (patch) | |
tree | 0f7a46911e43869e81fc0a7a264b9365b782c497 | |
parent | d519480cb72fff638846e7c4dc459a74759f0d8f (diff) | |
download | ATCD-585ab5ba3e9c00214b20f5d18b2d6f4f2dacb453.tar.gz |
ChangeLogTag:Thu Jan 27 08:36:17 2000 Darrell Brunsch <brunsch@uci.edu>
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp | 63 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/tao_imr_i.h | 23 |
2 files changed, 45 insertions, 41 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp index 4aae4eb39f0..875d6b0bfe4 100644 --- a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp @@ -77,6 +77,7 @@ TAO_IMR_i::init (int argc, char **argv) ImplementationRepository::Administration::_narrow (implrepo_object.in(), ACE_TRY_ENV); ACE_TRY_CHECK; + this->op_->set_imr (this->implrepo_.in ()); } ACE_CATCHANY { @@ -102,7 +103,7 @@ TAO_IMR_i::parse_args (void) return -1; } - this->op_ = TAO_IMR_Op::make_op (this->argv_[1], this->implrepo_.in ()); + this->op_ = TAO_IMR_Op::make_op (this->argv_[1]); // Check for unrecognized operation @@ -141,86 +142,86 @@ TAO_IMR_i::print_usage (void) // Factory for operations TAO_IMR_Op * -TAO_IMR_Op::make_op (const ASYS_TCHAR *op_name, ImplementationRepository::Administration_ptr ir) +TAO_IMR_Op::make_op (const ASYS_TCHAR *op_name) { if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("activate")) == 0) - return new TAO_IMR_Op_Activate (ir); + return new TAO_IMR_Op_Activate (); else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("add")) == 0) - return new TAO_IMR_Op_Add (ir); + return new TAO_IMR_Op_Add (); else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("autostart")) == 0) - return new TAO_IMR_Op_Autostart(ir); + return new TAO_IMR_Op_Autostart(); else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("ior")) == 0) - return new TAO_IMR_Op_IOR(ir); + return new TAO_IMR_Op_IOR(); else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("list")) == 0) - return new TAO_IMR_Op_List (ir); + return new TAO_IMR_Op_List (); else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("remove")) == 0) - return new TAO_IMR_Op_Remove (ir); + return new TAO_IMR_Op_Remove (); else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("shutdown")) == 0) - return new TAO_IMR_Op_Shutdown (ir); + return new TAO_IMR_Op_Shutdown (); else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("update")) == 0) - return new TAO_IMR_Op_Update (ir); + return new TAO_IMR_Op_Update (); return 0; } +// Sets the implrepo pointer. + +void +TAO_IMR_Op::set_imr (ImplementationRepository::Administration_ptr imr) +{ + this->implrepo_ = imr; +} + + // ============================================================================ // = Constructors. -TAO_IMR_Op::TAO_IMR_Op (ImplementationRepository::Administration_ptr implrepo) -: implrepo_ (implrepo) +TAO_IMR_Op::TAO_IMR_Op (void) { // Nothing } -TAO_IMR_Op_Activate::TAO_IMR_Op_Activate (ImplementationRepository::Administration_ptr implrepo) -: TAO_IMR_Op (implrepo) +TAO_IMR_Op_Activate::TAO_IMR_Op_Activate (void) { // Nothing } -TAO_IMR_Op_Add::TAO_IMR_Op_Add (ImplementationRepository::Administration_ptr implrepo) -: TAO_IMR_Op (implrepo), - activation_ (ImplementationRepository::NORMAL) +TAO_IMR_Op_Add::TAO_IMR_Op_Add (void) +: activation_ (ImplementationRepository::NORMAL) { // Nothing } -TAO_IMR_Op_Autostart::TAO_IMR_Op_Autostart (ImplementationRepository::Administration_ptr implrepo) -: TAO_IMR_Op (implrepo) +TAO_IMR_Op_Autostart::TAO_IMR_Op_Autostart (void) { // Nothing } -TAO_IMR_Op_IOR::TAO_IMR_Op_IOR (ImplementationRepository::Administration_ptr implrepo) -: TAO_IMR_Op (implrepo) +TAO_IMR_Op_IOR::TAO_IMR_Op_IOR (void) { // Nothing } -TAO_IMR_Op_List::TAO_IMR_Op_List (ImplementationRepository::Administration_ptr implrepo) -: TAO_IMR_Op (implrepo), - verbose_server_information_ (0) +TAO_IMR_Op_List::TAO_IMR_Op_List (void) +: verbose_server_information_ (0) { // Nothing } -TAO_IMR_Op_Remove::TAO_IMR_Op_Remove (ImplementationRepository::Administration_ptr implrepo) -: TAO_IMR_Op (implrepo) +TAO_IMR_Op_Remove::TAO_IMR_Op_Remove (void) { // Nothing } -TAO_IMR_Op_Shutdown::TAO_IMR_Op_Shutdown (ImplementationRepository::Administration_ptr implrepo) -: TAO_IMR_Op (implrepo) +TAO_IMR_Op_Shutdown::TAO_IMR_Op_Shutdown (void) { // Nothing } -TAO_IMR_Op_Update::TAO_IMR_Op_Update (ImplementationRepository::Administration_ptr implrepo) -: TAO_IMR_Op (implrepo), - set_command_line_ (0), +TAO_IMR_Op_Update::TAO_IMR_Op_Update (void) +: set_command_line_ (0), set_working_dir_ (0), set_activation_ (0) { diff --git a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.h b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.h index 71259cedd24..82f36575512 100644 --- a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.h +++ b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.h @@ -76,12 +76,15 @@ class TAO_IMR_Op // = DESCRIPTION // Provides a base class with virtual methods for each operation strategy. public: - static TAO_IMR_Op *make_op (const ASYS_TCHAR *op_name, ImplementationRepository::Administration_ptr ir); + static TAO_IMR_Op *make_op (const ASYS_TCHAR *op_name); // Factory. - TAO_IMR_Op (ImplementationRepository::Administration_ptr implrepo); + TAO_IMR_Op (void); // Constructor. + virtual void set_imr (ImplementationRepository::Administration_ptr imr); + // Sets the implrepo pointer + virtual ~TAO_IMR_Op (void); // Virtual Destructor. @@ -110,7 +113,7 @@ class TAO_IMR_Op_Activate : public TAO_IMR_Op // = DESCRIPTION // Activation is used to start servers via the Implementation Repository public: - TAO_IMR_Op_Activate (ImplementationRepository::Administration_ptr implrepo); + TAO_IMR_Op_Activate (void); ~TAO_IMR_Op_Activate (void); virtual int parse (int argc, ASYS_TCHAR **argv); @@ -133,7 +136,7 @@ class TAO_IMR_Op_Add : public TAO_IMR_Op // = DESCRIPTION // Add is used to register information about a server with the IMR. public: - TAO_IMR_Op_Add (ImplementationRepository::Administration_ptr implrepo); + TAO_IMR_Op_Add (void); ~TAO_IMR_Op_Add (void); virtual int parse (int argc, ASYS_TCHAR **argv); @@ -166,7 +169,7 @@ class TAO_IMR_Op_Autostart : public TAO_IMR_Op // Autostart is used to activate all servers with the AUTO_START activation // mode. public: - TAO_IMR_Op_Autostart (ImplementationRepository::Administration_ptr implrepo); + TAO_IMR_Op_Autostart (void); ~TAO_IMR_Op_Autostart (void); virtual int parse (int argc, ASYS_TCHAR **argv); @@ -187,7 +190,7 @@ class TAO_IMR_Op_IOR : public TAO_IMR_Op // IOR is used to create a simple IOR for a server that uses the // IMR and the Interoperable Naming Service. public: - TAO_IMR_Op_IOR (ImplementationRepository::Administration_ptr implrepo); + TAO_IMR_Op_IOR (void); ~TAO_IMR_Op_IOR (void); virtual int parse (int argc, ASYS_TCHAR **argv); @@ -214,7 +217,7 @@ class TAO_IMR_Op_List : public TAO_IMR_Op // List is used to either list all the servers registered in the IMR or just // look at one of them. public: - TAO_IMR_Op_List (ImplementationRepository::Administration_ptr implrepo); + TAO_IMR_Op_List (void); ~TAO_IMR_Op_List (void); virtual int parse (int argc, ASYS_TCHAR **argv); @@ -244,7 +247,7 @@ class TAO_IMR_Op_Remove : public TAO_IMR_Op // = DESCRIPTION // Remove is used to unregister a server in the IMR. public: - TAO_IMR_Op_Remove (ImplementationRepository::Administration_ptr implrepo); + TAO_IMR_Op_Remove (void); ~TAO_IMR_Op_Remove (void); virtual int parse (int argc, ASYS_TCHAR **argv); @@ -267,7 +270,7 @@ class TAO_IMR_Op_Shutdown : public TAO_IMR_Op // = DESCRIPTION // Shutdown is used to shutdown a server through the IMR. public: - TAO_IMR_Op_Shutdown (ImplementationRepository::Administration_ptr implrepo); + TAO_IMR_Op_Shutdown (void); ~TAO_IMR_Op_Shutdown (void); virtual int parse (int argc, ASYS_TCHAR **argv); @@ -291,7 +294,7 @@ class TAO_IMR_Op_Update : public TAO_IMR_Op // Update is used to update the information for a server registered // with the IMR. public: - TAO_IMR_Op_Update (ImplementationRepository::Administration_ptr implrepo); + TAO_IMR_Op_Update (void); ~TAO_IMR_Op_Update (void); virtual int parse (int argc, ASYS_TCHAR **argv); |