Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / Kokyu / Kokyu.cpp
blob32e1499580410c10b4c7c6b155bd3319e591fc71
1 #include "Kokyu.h"
3 #include <utility>
5 #include "Default_Dispatcher_Impl.h"
7 #if ! defined (__ACE_INLINE__)
8 #include "Kokyu.inl"
9 #endif /* __ACE_INLINE__ */
11 namespace Kokyu
13 int Dispatcher::dispatch (const Dispatch_Command* cmd, const QoSDescriptor& qos)
15 return dispatcher_impl_->dispatch (cmd, qos);
18 int Dispatcher::shutdown ()
20 return dispatcher_impl_->shutdown ();
23 int Dispatcher::activate ()
25 return dispatcher_impl_->activate ();
28 void Dispatcher::implementation (Dispatcher_Impl* impl)
30 std::unique_ptr<Dispatcher_Impl> tmp_impl (impl);
31 dispatcher_impl_ = std::move(tmp_impl);
34 Dispatcher*
35 Dispatcher_Factory::
36 create_dispatcher(const Dispatcher_Attributes& attrs)
38 Dispatcher* disp = 0;
39 Dispatcher_Impl* tmp = 0;
40 ACE_NEW_RETURN (tmp, Default_Dispatcher_Impl, 0);
41 ACE_NEW_RETURN (disp, Dispatcher, 0);
42 disp->implementation (tmp);
43 tmp->init (attrs);
44 return disp;