00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Policy_Manager.h 00006 * 00007 * $Id: Policy_Manager.h 79256 2007-08-08 11:24:06Z johnnyw $ 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/Policy_ManagerC.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 00052 /// Obtain a single cached policy. 00053 CORBA::Policy_ptr get_cached_policy (TAO_Cached_Policy_Type type); 00054 00055 // = The CORBA::PolicyManager operations 00056 00057 virtual CORBA::PolicyList * get_policy_overrides ( 00058 const CORBA::PolicyTypeSeq & ts); 00059 00060 virtual void set_policy_overrides (const CORBA::PolicyList & policies, 00061 CORBA::SetOverrideType set_add); 00062 00063 private: 00064 00065 // Disallow copying. 00066 TAO_Policy_Manager (TAO_Policy_Manager const &); 00067 TAO_Policy_Manager & operator= (TAO_Policy_Manager const &); 00068 00069 private: 00070 /// Protect access 00071 TAO_SYNCH_MUTEX mutex_; 00072 00073 /// The implementation. 00074 TAO_Policy_Set impl_; 00075 }; 00076 00077 TAO_END_VERSIONED_NAMESPACE_DECL 00078 00079 #if defined(_MSC_VER) 00080 #pragma warning(pop) 00081 #endif /* _MSC_VER */ 00082 00083 #if defined (__ACE_INLINE__) 00084 # include "tao/Policy_Manager.inl" 00085 #endif /* __ACE_INLINE__ */ 00086 00087 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */ 00088 00089 #include /**/ "ace/post.h" 00090 00091 #endif /* TAO_POLICY_MANAGER_H */