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