TAO
2.0.8
|
The policy manager implementation. More...
#include <Policy_Set.h>
Public Member Functions | |
TAO_Policy_Set (TAO_Policy_Scope scope) | |
TAO_Policy_Set (const TAO_Policy_Set &rhs) | |
Copy constructor. | |
~TAO_Policy_Set (void) | |
Destructor. | |
void | copy_from (TAO_Policy_Set *source) |
void | set_policy_overrides (const CORBA::PolicyList &policies, CORBA::SetOverrideType set_add) |
CORBA::PolicyList * | get_policy_overrides (const CORBA::PolicyTypeSeq &types) |
CORBA::Policy_ptr | get_policy (CORBA::PolicyType policy) |
Obtain a single policy. | |
CORBA::Policy_ptr | get_cached_const_policy (TAO_Cached_Policy_Type type) const |
Obtain a cached policy for speedy lookups. | |
CORBA::Policy_ptr | get_cached_policy (TAO_Cached_Policy_Type type) |
Obtain a single cached policy. | |
void | set_policy (const CORBA::Policy_ptr policy) |
Utility method to set a single policy. | |
CORBA::Policy * | get_policy_by_index (CORBA::ULong index) const |
CORBA::ULong | num_policies (void) const |
Private Member Functions | |
TAO_Policy_Set & | operator= (const TAO_Policy_Set &) |
void | cleanup_i (void) |
CORBA::Boolean | compatible_scope (TAO_Policy_Scope policy_scope) const |
Utility method to determine if a policy's scope is compatible with ours. | |
Private Attributes | |
CORBA::PolicyList | policy_list_ |
Policies set for this Policy_Manager. | |
CORBA::Policy * | cached_policies_ [TAO_CACHED_POLICY_MAX_CACHED] |
List of caches. | |
TAO_Policy_Scope | scope_ |
Scope associated to the Policy Manager Impl. |
The policy manager implementation.
This class is used to implement both the CORBA::PolicyManager and the CORBA::PolicyCurrent interfaces.
TAO_Policy_Set::TAO_Policy_Set | ( | TAO_Policy_Scope | scope | ) |
Creates a TAO_Policy_Set that has a given scope. The scope is used to determinate whether or not a given policy can be set for the given Policy Manager Implementation.
TAO_Policy_Set::TAO_Policy_Set | ( | const TAO_Policy_Set & | rhs | ) |
Copy constructor.
TAO_Policy_Set::~TAO_Policy_Set | ( | void | ) |
Destructor.
void TAO_Policy_Set::cleanup_i | ( | void | ) | [private] |
Remove and destroy all the policy objects owned by this policy manager.
CORBA::Boolean TAO_Policy_Set::compatible_scope | ( | TAO_Policy_Scope | policy_scope | ) | const [private] |
Utility method to determine if a policy's scope is compatible with ours.
void TAO_Policy_Set::copy_from | ( | TAO_Policy_Set * | source | ) |
Copy the state from source, it uses the copy() operator to obtain independent copies of all the policies.
CORBA::Policy_ptr TAO_Policy_Set::get_cached_const_policy | ( | TAO_Cached_Policy_Type | type | ) | const |
Obtain a cached policy for speedy lookups.
This method just returns a const reference to the policy to avoid obtaining a lock to increment the reference count. As such, it can only be used for single threaded cases or cases where the policies cannot be removed such as at the object and thread level scopes. This method is most likely not appropriate for accessing policies at the ORB level scope in any situation.
CORBA::Policy_ptr TAO_Policy_Set::get_cached_policy | ( | TAO_Cached_Policy_Type | type | ) |
Obtain a single cached policy.
CORBA::Policy_ptr TAO_Policy_Set::get_policy | ( | CORBA::PolicyType | policy | ) |
Obtain a single policy.
CORBA::Policy * TAO_Policy_Set::get_policy_by_index | ( | CORBA::ULong | index | ) | const |
Returns the policy at the specified index. CORBA::Policy::_nil
() is returned if the policy doesn't exist.
CORBA::PolicyList * TAO_Policy_Set::get_policy_overrides | ( | const CORBA::PolicyTypeSeq & | types | ) |
Get the values (if any) for the policies in types, if types is an empty list the method returns *all* the current policies.
CORBA::ULong TAO_Policy_Set::num_policies | ( | void | ) | const |
TAO_Policy_Set& TAO_Policy_Set::operator= | ( | const TAO_Policy_Set & | ) | [private] |
void TAO_Policy_Set::set_policy | ( | const CORBA::Policy_ptr | policy | ) |
Utility method to set a single policy.
void TAO_Policy_Set::set_policy_overrides | ( | const CORBA::PolicyList & | policies, |
CORBA::SetOverrideType | set_add | ||
) |
Modify the list of policies to include policies. If set_add is CORBA::SET_OVERRIDE
then we replace all the old policies. If it is CORBA::ADD_OVERRIDE
we simply add the policies in policies. No attempt is made to validate the policies for consistency.
CORBA::Policy* TAO_Policy_Set::cached_policies_[TAO_CACHED_POLICY_MAX_CACHED] [private] |
List of caches.
Policies set for this Policy_Manager.
TAO_Policy_Scope TAO_Policy_Set::scope_ [private] |
Scope associated to the Policy Manager Impl.