Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / CSD_Framework / CSD_Strategy_Proxy.inl
blobed79b01f34821e3337d0567fbe10fa0f80827c9d
1 // -*- C++ -*-
2 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
4 ACE_INLINE
5 TAO::CSD::Strategy_Proxy::Strategy_Proxy()
6   : strategy_impl_(0)
10 ACE_INLINE
11 TAO::CSD::Strategy_Proxy::~Strategy_Proxy()
13   strategy_impl_ = 0; // don't delete it! The var will do it for us.
16 ACE_INLINE
17 void
18 TAO::CSD::Strategy_Proxy::dispatch_request
19                                 (TAO_ServerRequest& server_request,
20                                  TAO::Portable_Server::Servant_Upcall& upcall)
23   if (this->strategy_impl_ == 0)
24     {
25       // This is the "default" strategy implementation.
26       upcall.servant()->_dispatch(server_request, &upcall);
27     }
28   else
29     {
30       // Delegate to the custom strategy object.
31       this->strategy_impl_->dispatch_request(server_request, upcall);
32     }
35 ACE_INLINE
36 bool
37 TAO::CSD::Strategy_Proxy::poa_activated_event(TAO_ORB_Core& orb_core)
39   // Delegate to the custom strategy object (or return true if this proxy
40   // is not holding a custom strategy).
41   return (this->strategy_impl_ == 0) ? true
42     : this->strategy_impl_->poa_activated_event(orb_core);
46 ACE_INLINE
47 void
48 TAO::CSD::Strategy_Proxy::poa_deactivated_event()
50   // We only need to do something if this proxy holds a custom strategy.
51   if (this->strategy_impl_)
52     {
53       // Delegate to the custom strategy object.
54       this->strategy_impl_->poa_deactivated_event();
55     }
58 ACE_INLINE
59 void
60 TAO::CSD::Strategy_Proxy::servant_activated_event
61                                   (PortableServer::Servant servant,
62                                    const PortableServer::ObjectId& oid)
64   // We only need to do something if this proxy holds a custom strategy.
65   if (this->strategy_impl_)
66     {
67       // Delegate to the custom strategy object.
68       this->strategy_impl_->servant_activated_event(servant, oid);
69     }
72 ACE_INLINE
73 void
74 TAO::CSD::Strategy_Proxy::servant_deactivated_event
75                                   (PortableServer::Servant servant,
76                                    const PortableServer::ObjectId& oid)
78   // We only need to do something if this proxy holds a custom strategy.
79   if (this->strategy_impl_)
80     {
81       // Delegate to the custom strategy object.
82       this->strategy_impl_->servant_deactivated_event(servant, oid);
83     }
86 TAO_END_VERSIONED_NAMESPACE_DECL