Policy_Manager.i

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Policy_Manager.i,v 1.31 2005/11/02 11:03:26 ossama Exp
00004 
00005 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 ACE_INLINE
00008 TAO_Policy_Manager::TAO_Policy_Manager (void)
00009   : impl_ (TAO_POLICY_ORB_SCOPE)
00010 {
00011 }
00012 
00013 ACE_INLINE CORBA::Policy_ptr
00014 TAO_Policy_Manager::get_policy (
00015   CORBA::PolicyType policy
00016   ACE_ENV_ARG_DECL)
00017 {
00018   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, 0);
00019   return this->impl_.get_policy (policy ACE_ENV_ARG_PARAMETER);
00020 }
00021 
00022 ACE_INLINE CORBA::Policy_ptr
00023 TAO_Policy_Manager::get_cached_policy (TAO_Cached_Policy_Type type
00024                                        ACE_ENV_ARG_DECL)
00025 {
00026 
00027   // @@ Previous code used a "double-checked locking hack" to check
00028   // if the policy was set before grabbing the lock to actually get
00029   // it, so that could save a lock operation.  This was removed, as
00030   // it is not as easy to do this anymore.
00031 
00032   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, 0);
00033 
00034   return this->impl_.get_cached_policy (type
00035                                         ACE_ENV_ARG_PARAMETER);
00036 }
00037 
00038 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 11:54:20 2006 for TAO by doxygen 1.3.6