diff options
Diffstat (limited to 'CIAO/DAnCE/TargetManager/TargetManager_exec.cpp')
-rw-r--r-- | CIAO/DAnCE/TargetManager/TargetManager_exec.cpp | 73 |
1 files changed, 27 insertions, 46 deletions
diff --git a/CIAO/DAnCE/TargetManager/TargetManager_exec.cpp b/CIAO/DAnCE/TargetManager/TargetManager_exec.cpp index f947e1944d7..2c22d608ecb 100644 --- a/CIAO/DAnCE/TargetManager/TargetManager_exec.cpp +++ b/CIAO/DAnCE/TargetManager/TargetManager_exec.cpp @@ -16,6 +16,8 @@ #include "DomainEventsC.h" +using namespace std; + namespace CIDL_TargetManager_i { //================================================================== @@ -28,7 +30,7 @@ namespace CIDL_TargetManager_i TargetManagerImpl_Context *context ) : _exec (exec), - orb_ (CORBA::ORB::_duplicate (orb)), + orb_ (orb), context_ (context) { // The DomainDataManager created here ... @@ -60,7 +62,7 @@ namespace CIDL_TargetManager_i ACE_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { - return CIAO::DomainDataManager:: + return CIAO::DomainDataManager:: get_data_manager ()->get_initial_domain (); } @@ -106,10 +108,9 @@ namespace CIDL_TargetManager_i { // Your code here. if (CIAO::debug_level () > 9) - { - ACE_DEBUG ((LM_DEBUG , ".. Update Domain called ...\n")); - } - + { + ACE_DEBUG ((LM_DEBUG , ".. Update Domain called ...\n")); + } CIAO::DomainDataManager:: get_data_manager ()->update_domain ( elements, @@ -125,10 +126,7 @@ namespace CIDL_TargetManager_i if (updateKind == ::Deployment::Delete || updateKind == ::Deployment::Add) { - if (CIAO::debug_level () > 9) - { - ACE_DEBUG ((LM_DEBUG , "TM::Creating the changed event\n")); - } + ACE_DEBUG ((LM_DEBUG , "TM::Creating the changed event\n")); CIAO::Domain_Changed_Event_var changed_event = new OBV_CIAO::Domain_Changed_Event (); @@ -136,25 +134,13 @@ namespace CIDL_TargetManager_i ::Deployment::Domain_var temp_domain = new ::Deployment::Domain (domainSubset); - if (CIAO::debug_level () > 9) - { - ACE_DEBUG ((LM_DEBUG , "TM::After getting the current domain\n")); - } - + ACE_DEBUG ((LM_DEBUG , "TM::After getting the current domain\n")); changed_event->changes (temp_domain); changed_event->change_kind (updateKind); - if (CIAO::debug_level () > 9) - { - ACE_DEBUG ((LM_DEBUG , "TM::Sending the event to the Planner_Manager\n")); - } - + ACE_DEBUG ((LM_DEBUG , "TM::Sending the event to the Planner_Manager\n")); context_->push_changes (changed_event); - - if (CIAO::debug_level () > 9) - { - ACE_DEBUG ((LM_DEBUG , "TM::After Sending the event to the Planner_Manager\n")); - } + ACE_DEBUG ((LM_DEBUG , "TM::After Sending the event to the Planner_Manager\n")); } } @@ -204,9 +190,6 @@ namespace CIDL_TargetManager_i { // Your code here. ACE_DEBUG ((LM_DEBUG, "Get component cpu :: Skeleton Impl")); - - // todo - return 0; } @@ -249,15 +232,14 @@ namespace CIDL_TargetManager_i ACE_DEBUG ((LM_DEBUG , "Calling TM constructor")); } - if (CORBA::is_nil (this->exec_ext_object_.in ())) - { - this->exec_object_ = new TargetManager_exec_i(this, - context_->_ciao_the_Container()->the_ORB(), - context_ - ); - } - - return ::Deployment::CCM_TargetManager::_duplicate (this->exec_object_.in ()); + if (this->exec_object_.in () == 0) + { + this->exec_object_ = new TargetManager_exec_i(this, + context_->_ciao_the_Container()->the_ORB(), + context_ + ); + } + return this->exec_object_.in (); } ::CIAO::CCM_TargetManagerExt_ptr TargetManagerImpl_exec_i @@ -265,12 +247,11 @@ namespace CIDL_TargetManager_i ACE_ENV_SINGLE_ARG_DECL_NOT_USED ) ACE_THROW_SPEC ((CORBA::SystemException)) { - if (CORBA::is_nil (this->exec_ext_object_.in ())) - { - this->exec_ext_object_ = new TargetManagerExt_exec_i(); - } - - return ::CIAO::CCM_TargetManagerExt::_duplicate (this->exec_ext_object_.in ()); + if (this->exec_ext_object_.in () == 0) + { + this->exec_ext_object_ = new TargetManagerExt_exec_i(); + } + return this->exec_ext_object_.in (); } // Operations from Components::SessionComponent @@ -328,7 +309,7 @@ namespace CIDL_TargetManager_i { ACE_DEBUG ((LM_DEBUG , "Inside CCM_ACTIVATE\n")); } - this->get_targetMgr (); + get_targetMgr (); } void @@ -388,7 +369,7 @@ namespace CIDL_TargetManager_i ::Components::CCMException)) { ::Components::EnterpriseComponent_ptr retval = - ::Components::EnterpriseComponent::_nil (); + ::Components::EnterpriseComponent::_nil (); ACE_NEW_THROW_EX ( retval, @@ -403,7 +384,7 @@ namespace CIDL_TargetManager_i create_CIAO_TargetManagerHome_Impl (void) { ::Components::HomeExecutorBase_ptr retval = - ::Components::HomeExecutorBase::_nil (); + ::Components::HomeExecutorBase::_nil (); ACE_NEW_RETURN ( retval, |