Policy_Current.cpp

Go to the documentation of this file.
00001 // Policy_Current.cpp,v 1.4 2006/03/10 07:19:06 jtc Exp
00002 
00003 #include "tao/Policy_Current.h"
00004 
00005 #if (TAO_HAS_CORBA_MESSAGING == 1)
00006 
00007 #include "tao/TSS_Resources.h"
00008 
00009 #if !defined (__ACE_INLINE__)
00010 # include "tao/Policy_Current.inl"
00011 #endif /* ! __ACE_INLINE__ */
00012 
00013 ACE_RCSID (tao,
00014            Policy_Current,
00015            "Policy_Current.cpp,v 1.4 2006/03/10 07:19:06 jtc Exp")
00016 
00017 
00018 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00019 
00020 TAO_Policy_Current_Impl &
00021 TAO_Policy_Current::implementation (TAO_Policy_Current_Impl &current)
00022 {
00023   TAO_TSS_Resources * const tss =
00024     TAO_TSS_Resources::instance ();
00025 
00026   TAO_Policy_Current_Impl *old = tss->policy_current_;
00027   tss->policy_current_ = &current;
00028   return *old;
00029 }
00030 
00031 TAO_Policy_Current_Impl &
00032 TAO_Policy_Current::implementation (void) const
00033 {
00034   return *TAO_TSS_Resources::instance ()->policy_current_;
00035 }
00036 
00037 CORBA::Policy_ptr
00038 TAO_Policy_Current::get_policy (
00039       CORBA::PolicyType policy
00040       ACE_ENV_ARG_DECL)
00041 {
00042   TAO_Policy_Current_Impl &impl = this->implementation ();
00043 
00044   return impl.get_policy (policy ACE_ENV_ARG_PARAMETER);
00045 }
00046 
00047 CORBA::PolicyList *
00048 TAO_Policy_Current::get_policy_overrides (
00049         const CORBA::PolicyTypeSeq & ts
00050         ACE_ENV_ARG_DECL)
00051   ACE_THROW_SPEC ((CORBA::SystemException))
00052 
00053 {
00054   TAO_Policy_Current_Impl &impl = this->implementation ();
00055 
00056   return impl.get_policy_overrides (ts ACE_ENV_ARG_PARAMETER);
00057 }
00058 
00059 void
00060 TAO_Policy_Current::set_policy_overrides (const CORBA::PolicyList & policies,
00061                                           CORBA::SetOverrideType set_add
00062                                           ACE_ENV_ARG_DECL)
00063   ACE_THROW_SPEC ((CORBA::SystemException,
00064                    CORBA::InvalidPolicies))
00065 {
00066   TAO_Policy_Current_Impl &impl = this->implementation ();
00067 
00068   impl.set_policy_overrides (policies, set_add ACE_ENV_ARG_PARAMETER);
00069 }
00070 
00071 CORBA::Policy_ptr
00072 TAO_Policy_Current::get_cached_policy (TAO_Cached_Policy_Type type
00073                                        ACE_ENV_ARG_DECL)
00074 {
00075   TAO_Policy_Current_Impl &impl = this->implementation ();
00076 
00077   return impl.get_cached_policy (type
00078                                  ACE_ENV_ARG_PARAMETER);
00079 }
00080 
00081 TAO_END_VERSIONED_NAMESPACE_DECL
00082 
00083 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */

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