#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 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] = policy->copy ();
00052 cep_index++;
00053 }
00054 }
00055 }
|
|
|
Obtain a single cached policy.
Definition at line 20 of file POA_Policy_Set.inl. References TAO_Policy_Set::get_cached_policy().
00021 {
00022 return this->impl_.get_cached_policy (type);
00023 }
|
|
|
Obtain a single policy.
Definition at line 39 of file POA_Policy_Set.inl. References TAO_Policy_Set::get_policy(). Referenced by TAO_Root_POA::get_policy().
00040 {
00041 return this->impl_.get_policy (policy);
00042 }
|
|
|
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.inl. References TAO_Policy_Set::get_policy_by_index(). Referenced by add_client_exposed_fixed_policies(), and TAO::Portable_Server::Cached_Policies::update().
00015 {
00016 return this->impl_.get_policy_by_index (index);
00017 }
|
|
|
Definition at line 26 of file POA_Policy_Set.inl. References TAO_Policy_Set::set_policy_overrides(). Referenced by TAO_Root_POA::create_POA_i(), and TAO_POAManager_Factory::create_POAManager().
00027 {
00028 // Add the policies if they don't exist, override them if they do.
00029 this->impl_.set_policy_overrides (policies, CORBA::ADD_OVERRIDE);
00030 }
|
|
|
Definition at line 33 of file POA_Policy_Set.inl. References POA_CORBA::Policy_ptr, and TAO_Policy_Set::set_policy(). Referenced by TAO_Object_Adapter::init_default_policies(), and TAO_Object_Adapter::open().
00034 {
00035 this->impl_.set_policy (policy);
00036 }
|
|
|
Get the number of policies.
Definition at line 8 of file POA_Policy_Set.inl. References TAO_Policy_Set::num_policies(). Referenced by add_client_exposed_fixed_policies(), and TAO::Portable_Server::Cached_Policies::update().
00009 {
00010 return this->impl_.num_policies ();
00011 }
|
|
|
Definition at line 45 of file POA_Policy_Set.inl. Referenced by TAO_Root_POA::create_POA_i(), TAO_POAManager_Factory::create_POAManager(), and TAO_Object_Adapter::open().
00046 {
00047 return this->impl_;
00048 }
|
|
||||||||||||
|
Definition at line 58 of file POA_Policy_Set.cpp. References ACE_ERROR, TAO_Policy_Set::get_policy_by_index(), TAO_Policy_Validator::legal_policy(), LM_ERROR, TAO_ORB_Core::load_policy_validators(), TAO_Policy_Set::num_policies(), and TAO_Policy_Validator::validate(). Referenced by TAO_Root_POA::create_POA_i(), TAO_POAManager_Factory::create_POAManager(), and TAO_Object_Adapter::open().
00060 {
00061 // Just give a last chance for all the unloaded validators in other
00062 // libraries to be registered
00063 orb_core.load_policy_validators (validator);
00064
00065 // Validate that all of the specified policies make sense.
00066 validator.validate (this->impl_ );
00067
00068 // Verify that all policies are legal for the currently loaded
00069 // POA extensions.
00070 for (CORBA::ULong i = 0;
00071 i < this->impl_.num_policies ();
00072 i++)
00073 {
00074 CORBA::Policy_var policy = this->impl_.get_policy_by_index (i);
00075
00076 CORBA::PolicyType type = policy->policy_type ();
00077
00078 if (validator.legal_policy (type) == 0)
00079 {
00080 #if !defined (CORBA_E_MICRO)
00081 // An invalid policy was specified. Let the user know about
00082 // it.
00083 throw PortableServer::POA::InvalidPolicy ();
00084 #else
00085 ACE_ERROR ((LM_ERROR, "Invalid policy\n"));
00086 #endif
00087 }
00088 }
00089 }
|
|
|
Definition at line 67 of file POA_Policy_Set.h. |
1.3.6