diff options
author | venkita <venkita@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-07-25 23:41:55 +0000 |
---|---|---|
committer | venkita <venkita@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-07-25 23:41:55 +0000 |
commit | 4f9008d582eca63957fa9805ac46425f8baf475a (patch) | |
tree | 0c2d30977f52d7860362ff76b28ecc4d9a158421 /Kokyu/Kokyu.cpp | |
parent | 540f1412da766da7f25aed420b518e1f372b69bf (diff) | |
download | ATCD-4f9008d582eca63957fa9805ac46425f8baf475a.tar.gz |
ChangeLogTag: Fri Jul 25 17:41:08 2003 Venkita Subramonian <venkita@cse.wustl.edu>
Diffstat (limited to 'Kokyu/Kokyu.cpp')
-rw-r--r-- | Kokyu/Kokyu.cpp | 67 |
1 files changed, 10 insertions, 57 deletions
diff --git a/Kokyu/Kokyu.cpp b/Kokyu/Kokyu.cpp index 274068c8a22..54953431006 100644 --- a/Kokyu/Kokyu.cpp +++ b/Kokyu/Kokyu.cpp @@ -1,14 +1,14 @@ // $Id$ -#include "ace/Dynamic_Service.h" #include "Kokyu.h" + #include "Default_Dispatcher_Impl.h" #if ! defined (__ACE_INLINE__) #include "Kokyu.i" #endif /* __ACE_INLINE__ */ -ACE_RCSID(Kokyu, Dispatcher_Impl, "$Id$") +ACE_RCSID(Kokyu, Kokyu, "$Id$") namespace Kokyu { @@ -35,66 +35,19 @@ void Dispatcher::implementation (Dispatcher_Impl* impl) //dispatcher_impl_.reset (impl); } - -Dispatcher* +Dispatcher_Auto_Ptr Dispatcher_Factory:: -create_dispatcher (const ConfigInfoSet& config_info_set) +create_dispatcher(const ConfigInfoSet& config_info_set) { - Dispatcher_Impl* tmp; - ACE_NEW_RETURN (tmp, Default_Dispatcher_Impl, (Dispatcher*)0); Dispatcher* disp; - ACE_NEW_RETURN (disp, Dispatcher, (Dispatcher*)0); + Dispatcher_Auto_Ptr nil_ptr((Dispatcher*)0); + Dispatcher_Impl* tmp; + ACE_NEW_RETURN (tmp, Default_Dispatcher_Impl, nil_ptr); + ACE_NEW_RETURN (disp, Dispatcher, nil_ptr); + Dispatcher_Auto_Ptr disp_auto_ptr(disp); disp->implementation (tmp); tmp->init (config_info_set); - return disp; -} - -void -DSRT_Dispatcher::implementation (DSRT_Dispatcher_Impl* impl) -{ - dispatcher_impl_ = impl; -} - -int -DSRT_Dispatcher::schedule (guid_t guid, const DSRT_QoSDescriptor& qos) -{ - return dispatcher_impl_->schedule (guid, qos); -} - -int -DSRT_Dispatcher::update_schedule (guid_t guid, const DSRT_QoSDescriptor& qos) -{ - return dispatcher_impl_->update_schedule (guid, qos); -} - -int -DSRT_Dispatcher::cancel_schedule (guid_t guid, const DSRT_QoSDescriptor& qos) -{ - return dispatcher_impl_->cancel_schedule (guid, qos); -} - -DSRT_Dispatcher* -Dispatcher_Factory:: -create_DSRT_dispatcher (const DSRT_ConfigInfo& config_info) -{ - ACE_UNUSED_ARG ((config_info)); - - DSRT_Dispatcher_Impl* tmp; - - //DSRT_Dispatcher_Impl::init_svcs (); - - ACE_Service_Config::open ("Kokyu", ACE_DEFAULT_LOGGER_KEY, 0); - - //tmp = - // ACE_Dynamic_Service<DSRT_Dispatcher_Impl>::instance ("DSRT_Dispatcher_Impl"); - - ACE_NEW_RETURN (tmp, DSRT_Dispatcher_Impl, (DSRT_Dispatcher*) 0); - ACE_ASSERT (tmp != 0); - DSRT_Dispatcher* disp; - ACE_NEW_RETURN (disp, DSRT_Dispatcher, (DSRT_Dispatcher*)0); - disp->implementation (tmp); - tmp->init (config_info); - return disp; + return disp_auto_ptr; } } |