diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2005-06-10 10:21:12 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2005-06-10 10:21:12 +0000 |
commit | 2a52c550e3e569af4e1e2bad3f1726679d91270a (patch) | |
tree | 030d1d711ada3a07e17a5623c5cb8f2aa179678b /TAO/tao/Policy_Current.cpp | |
parent | 940ab4dba0771b0fec126fc330ad8d8989dcd904 (diff) | |
download | ATCD-2a52c550e3e569af4e1e2bad3f1726679d91270a.tar.gz |
ChangeLogTag: Thu Jun 9 18:49:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tao/Policy_Current.cpp')
-rw-r--r-- | TAO/tao/Policy_Current.cpp | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/TAO/tao/Policy_Current.cpp b/TAO/tao/Policy_Current.cpp new file mode 100644 index 00000000000..10def0962a0 --- /dev/null +++ b/TAO/tao/Policy_Current.cpp @@ -0,0 +1,80 @@ +// $Id$ + +#include "Policy_Current.h" + +#if (TAO_HAS_CORBA_MESSAGING == 1) + +#include "tao/TSS_Resources.h" + +#if !defined (__ACE_INLINE__) +# include "tao/Policy_Current.inl" +#endif /* ! __ACE_INLINE__ */ + + +ACE_RCSID (tao, + Policy_Current, + "$Id$") + + +TAO_Policy_Current_Impl & +TAO_Policy_Current::implementation (TAO_Policy_Current_Impl ¤t) +{ + TAO_TSS_Resources *tss = + TAO_TSS_RESOURCES::instance (); + + TAO_Policy_Current_Impl *old = tss->policy_current_; + tss->policy_current_ = ¤t; + return *old; +} + +TAO_Policy_Current_Impl & +TAO_Policy_Current::implementation (void) const +{ + return *TAO_TSS_RESOURCES::instance ()->policy_current_; +} + +CORBA::Policy_ptr +TAO_Policy_Current::get_policy ( + CORBA::PolicyType policy + ACE_ENV_ARG_DECL) +{ + TAO_Policy_Current_Impl &impl = this->implementation (); + + return impl.get_policy (policy ACE_ENV_ARG_PARAMETER); +} + +CORBA::PolicyList * +TAO_Policy_Current::get_policy_overrides ( + const CORBA::PolicyTypeSeq & ts + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) + +{ + TAO_Policy_Current_Impl &impl = this->implementation (); + + return impl.get_policy_overrides (ts ACE_ENV_ARG_PARAMETER); +} + +void +TAO_Policy_Current::set_policy_overrides (const CORBA::PolicyList & policies, + CORBA::SetOverrideType set_add + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + CORBA::InvalidPolicies)) +{ + TAO_Policy_Current_Impl &impl = this->implementation (); + + impl.set_policy_overrides (policies, set_add ACE_ENV_ARG_PARAMETER); +} + +CORBA::Policy_ptr +TAO_Policy_Current::get_cached_policy (TAO_Cached_Policy_Type type + ACE_ENV_ARG_DECL) +{ + TAO_Policy_Current_Impl &impl = this->implementation (); + + return impl.get_cached_policy (type + ACE_ENV_ARG_PARAMETER); +} + +#endif /* TAO_HAS_CORBA_MESSAGING == 1 */ |