00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Policy_Current.h 00006 * 00007 * Policy_Current.h,v 1.3 2005/11/24 11:05:45 ossama Exp 00008 * 00009 * An implementation for the CORBA::PolicyManager interface. 00010 * 00011 * 00012 * @author Carlos O'Ryan (coryan@cs.wustl.edu) 00013 */ 00014 //============================================================================= 00015 00016 00017 #ifndef TAO_POLICY_CURRENT_H 00018 #define TAO_POLICY_CURRENT_H 00019 00020 #include /**/ "ace/pre.h" 00021 00022 #include "tao/orbconf.h" 00023 00024 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00025 # pragma once 00026 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00027 00028 #if (TAO_HAS_CORBA_MESSAGING == 1) 00029 00030 #include "tao/PolicyC.h" 00031 #include "tao/LocalObject.h" 00032 00033 #if defined(_MSC_VER) 00034 #pragma warning(push) 00035 #pragma warning(disable:4250) 00036 #endif /* _MSC_VER */ 00037 00038 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00039 00040 class TAO_Policy_Current_Impl; 00041 00042 class TAO_Policy_Current 00043 : public CORBA::PolicyCurrent 00044 , public TAO_Local_RefCounted_Object 00045 { 00046 public: 00047 /// Constructor 00048 TAO_Policy_Current (void); 00049 00050 /// Obtain a single policy. 00051 CORBA::Policy_ptr get_policy ( 00052 CORBA::PolicyType policy 00053 ACE_ENV_ARG_DECL); 00054 00055 /// Obtain a single cached policy. 00056 CORBA::Policy_ptr get_cached_policy (TAO_Cached_Policy_Type type 00057 ACE_ENV_ARG_DECL); 00058 00059 // = The CORBA::PolicyManager operations 00060 00061 virtual CORBA::PolicyList * get_policy_overrides ( 00062 const CORBA::PolicyTypeSeq & ts 00063 ACE_ENV_ARG_DECL_WITH_DEFAULTS 00064 ) 00065 ACE_THROW_SPEC ((CORBA::SystemException)); 00066 00067 virtual void set_policy_overrides ( 00068 const CORBA::PolicyList & policies, 00069 CORBA::SetOverrideType set_add 00070 ACE_ENV_ARG_DECL_WITH_DEFAULTS 00071 ) 00072 ACE_THROW_SPEC ((CORBA::SystemException, 00073 CORBA::InvalidPolicies)); 00074 00075 // = Set and get the implementation. 00076 TAO_Policy_Current_Impl &implementation (void) const; 00077 TAO_Policy_Current_Impl &implementation (TAO_Policy_Current_Impl &); 00078 }; 00079 00080 TAO_END_VERSIONED_NAMESPACE_DECL 00081 00082 #if defined(_MSC_VER) 00083 #pragma warning(pop) 00084 #endif /* _MSC_VER */ 00085 00086 #if defined (__ACE_INLINE__) 00087 # include "tao/Policy_Current.inl" 00088 #endif /* __ACE_INLINE__ */ 00089 00090 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */ 00091 00092 #include /**/ "ace/post.h" 00093 00094 #endif /* TAO_POLICY_CURRENT_H */