#include <POA_Policy_Set.h>
Collaboration diagram for TAO_POA_Policy_Set:
Public Member Functions | |
TAO_POA_Policy_Set (void) | |
TAO_POA_Policy_Set (const TAO_POA_Policy_Set &rhs) | |
~TAO_POA_Policy_Set (void) | |
CORBA::Policy * | get_policy_by_index (CORBA::ULong index) |
CORBA::ULong | num_policies (void) const |
Get the number of policies. | |
CORBA::Policy_ptr | get_cached_policy (TAO_Cached_Policy_Type type) |
Obtain a single cached policy. | |
void | merge_policies (const CORBA::PolicyList &policies) |
void | merge_policy (const CORBA::Policy_ptr policy) |
void | validate_policies (TAO_Policy_Validator &validator, TAO_ORB_Core &orb_core) |
void | add_client_exposed_fixed_policies (CORBA::PolicyList *client_exposed_policies) |
Add all of the client exposed policies to the specified list. | |
TAO_Policy_Set & | policies (void) |
CORBA::Policy_ptr | get_policy (CORBA::PolicyType policy) |
Obtain a single policy. | |
Protected Attributes | |
TAO_Policy_Set | impl_ |
|
Definition at line 20 of file POA_Policy_Set.cpp. References TAO_POLICY_POA_SCOPE.
00021 : impl_ (TAO_POLICY_POA_SCOPE) 00022 { 00023 } |
|
Definition at line 25 of file POA_Policy_Set.cpp.
|
|
Definition at line 31 of file POA_Policy_Set.cpp.
00032 { 00033 } |
|
Add all of the client exposed policies to the specified list.
Definition at line 36 of file POA_Policy_Set.cpp. References ACE_CHECK, ACE_ENV_SINGLE_ARG_PARAMETER, get_policy_by_index(), num_policies(), and TAO_POLICY_CLIENT_EXPOSED. Referenced by TAO_Root_POA::client_exposed_policies().
00038 { 00039 CORBA::ULong cep_index = client_exposed_policies->length (); 00040 00041 for (CORBA::ULong i = 0; 00042 i < this->num_policies (); 00043 ++i) 00044 { 00045 CORBA::Policy_var policy = this->get_policy_by_index (i); 00046 00047 // If this policy is client exposed, add it to the list. 00048 if (policy->_tao_scope () & TAO_POLICY_CLIENT_EXPOSED) 00049 { 00050 client_exposed_policies->length (cep_index + 1); 00051 (*client_exposed_policies)[cep_index] = 00052 policy->copy (ACE_ENV_SINGLE_ARG_PARAMETER); 00053 ACE_CHECK; 00054 00055 cep_index++; 00056 } 00057 } 00058 } |
|
Obtain a single cached policy.
Definition at line 20 of file POA_Policy_Set.i. References ACE_ENV_ARG_PARAMETER, and TAO_Policy_Set::get_cached_policy().
00022 { 00023 return this->impl_.get_cached_policy (type 00024 ACE_ENV_ARG_PARAMETER); 00025 } |
|
Obtain a single policy.
Definition at line 47 of file POA_Policy_Set.i. References ACE_ENV_ARG_PARAMETER, and TAO_Policy_Set::get_policy(). Referenced by TAO_Root_POA::get_policy().
00049 { 00050 return this->impl_.get_policy (policy ACE_ENV_ARG_PARAMETER); 00051 } |
|
Returns the policy at the specified index. CORBA::Policy::_nil () is returned if the policy doesn't exist Definition at line 14 of file POA_Policy_Set.i. References TAO_Policy_Set::get_policy_by_index(). Referenced by add_client_exposed_fixed_policies().
00015 { 00016 return this->impl_.get_policy_by_index (index); 00017 } |
|
Referenced by TAO_Root_POA::create_POA_i(). |
|
Definition at line 39 of file POA_Policy_Set.i. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, POA_CORBA::Policy_ptr, and TAO_Policy_Set::set_policy(). Referenced by TAO_Object_Adapter::open().
00041 { 00042 this->impl_.set_policy (policy ACE_ENV_ARG_PARAMETER); 00043 ACE_CHECK; 00044 } |
|
Get the number of policies.
Definition at line 8 of file POA_Policy_Set.i. References TAO_Policy_Set::num_policies(). Referenced by add_client_exposed_fixed_policies().
00009 { 00010 return this->impl_.num_policies (); 00011 } |
|
Definition at line 54 of file POA_Policy_Set.i. Referenced by TAO_Root_POA::create_POA_i(), and TAO_Object_Adapter::open().
00055 { 00056 return this->impl_; 00057 } |
|
Definition at line 61 of file POA_Policy_Set.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_ERROR, ACE_THROW, TAO_Policy_Set::get_policy_by_index(), TAO_Policy_Validator::legal_policy(), LM_ERROR, TAO_Policy_Set::num_policies(), and TAO_Policy_Validator::validate(). Referenced by TAO_Root_POA::create_POA_i(), and TAO_Object_Adapter::open().
00064 { 00065 // Just give a last chance for all the unloaded validators in other 00066 // libraries to be registered 00067 orb_core.load_policy_validators (validator ACE_ENV_ARG_PARAMETER); 00068 ACE_CHECK; 00069 00070 // Validate that all of the specified policies make sense. 00071 validator.validate (this->impl_ ACE_ENV_ARG_PARAMETER); 00072 ACE_CHECK; 00073 00074 // Verify that all policies are legal for the currently loaded 00075 // POA extensions. 00076 for (CORBA::ULong i = 0; 00077 i < this->impl_.num_policies (); 00078 i++) 00079 { 00080 CORBA::Policy_var policy = this->impl_.get_policy_by_index (i); 00081 00082 CORBA::PolicyType type = policy->policy_type (ACE_ENV_SINGLE_ARG_PARAMETER); 00083 ACE_CHECK; 00084 00085 if (validator.legal_policy (type) == 0) 00086 { 00087 #if ! defined (CORBA_E_MICRO) 00088 // An invalid policy was specified. Let the user know about 00089 // it. 00090 ACE_THROW (PortableServer::POA::InvalidPolicy ()); 00091 #else 00092 ACE_ERROR ((LM_ERROR, "Invalid policy\n")); 00093 #endif 00094 } 00095 } 00096 } |
|
Definition at line 73 of file POA_Policy_Set.h. |