本文整理汇总了C++中corba::Policy_ptr::policy_type方法的典型用法代码示例。如果您正苦于以下问题:C++ Policy_ptr::policy_type方法的具体用法?C++ Policy_ptr::policy_type怎么用?C++ Policy_ptr::policy_type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类corba::Policy_ptr
的用法示例。
在下文中一共展示了Policy_ptr::policy_type方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
TAO_Stub *
TAO_RT_Stub::set_policy_overrides (const CORBA::PolicyList & policies,
CORBA::SetOverrideType set_add)
{
// Validity check. Make sure requested policies are allowed to be
// set at this scope.
for (CORBA::ULong i = 0; i < policies.length (); ++i)
{
CORBA::Policy_ptr policy = policies[i];
if (!CORBA::is_nil (policy))
{
CORBA::PolicyType const type = policy->policy_type ();
if (type == RTCORBA::PRIORITY_MODEL_POLICY_TYPE ||
type == RTCORBA::THREADPOOL_POLICY_TYPE ||
type == RTCORBA::SERVER_PROTOCOL_POLICY_TYPE)
throw ::CORBA::NO_PERMISSION ();
}
}
// We are not required to check for consistency of <policies> with
// overrides at other levels or with policies exported in the IOR.
return this->TAO_Stub::set_policy_overrides(policies, set_add);
}