00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Default_Policy_Validator.h 00006 * 00007 * $Id: Default_Policy_Validator.h 76593 2007-01-25 19:19:27Z johnnyw $ 00008 * 00009 * This file contains the declaration for the default POA policy validator. 00010 * 00011 * @author Angelo Corsaro <corsaro@cs.wustl.edu> 00012 * @author Frank Hunleth <fhuntleth@cs.wustl.edu> 00013 */ 00014 //============================================================================= 00015 00016 #ifndef TAO_DEFAULT_POLICY_VALIDATOR_H_ 00017 #define TAO_DEFAULT_POLICY_VALIDATOR_H_ 00018 00019 #include /**/ "ace/pre.h" 00020 00021 #include "tao/PortableServer/portableserver_export.h" 00022 00023 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00024 # pragma once 00025 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00026 00027 #include "tao/Policy_Validator.h" 00028 00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00030 00031 class TAO_PortableServer_Export TAO_POA_Default_Policy_Validator 00032 : public TAO_Policy_Validator 00033 { 00034 public: 00035 00036 /// Constructor. 00037 TAO_POA_Default_Policy_Validator (TAO_ORB_Core &orb_core); 00038 00039 /// Destructor. 00040 ~TAO_POA_Default_Policy_Validator (void); 00041 00042 protected: 00043 /** 00044 * Validate that the policies in the specified set 00045 * are consistent and legal. Throw an appropriate exception 00046 * if that is not the case. 00047 */ 00048 void validate_impl (TAO_Policy_Set &policies); 00049 00050 /// Add/merge policies. 00051 void merge_policies_impl (TAO_Policy_Set &policies); 00052 00053 /** 00054 * Return whether the specified policy type is legal for the 00055 * current configuration. This is needed since the user can 00056 * potentially specify policies that are unknown to an 00057 * validate () routine, and these need to be caught. 00058 */ 00059 virtual CORBA::Boolean legal_policy_impl (CORBA::PolicyType type); 00060 00061 }; 00062 00063 TAO_END_VERSIONED_NAMESPACE_DECL 00064 00065 #include /**/ "ace/post.h" 00066 #endif /* TAO_DEFAULT_POLICY_VALIDATOR_H_ */