本文整理汇总了C++中portableinterceptor::ORBInitInfo_ptr::register_policy_factory方法的典型用法代码示例。如果您正苦于以下问题:C++ ORBInitInfo_ptr::register_policy_factory方法的具体用法?C++ ORBInitInfo_ptr::register_policy_factory怎么用?C++ ORBInitInfo_ptr::register_policy_factory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类portableinterceptor::ORBInitInfo_ptr
的用法示例。
在下文中一共展示了ORBInitInfo_ptr::register_policy_factory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
TAO_FT_ServerORBInitializer::register_policy_factories (
PortableInterceptor::ORBInitInfo_ptr info)
{
// Register the FTCORBA policy factories.
PortableInterceptor::PolicyFactory_ptr temp_factory =
PortableInterceptor::PolicyFactory::_nil ();
PortableInterceptor::PolicyFactory_var policy_factory;
// This policy factory is used for all FTCORBA related policies.
ACE_NEW_THROW_EX (temp_factory,
TAO_FT_ServerPolicyFactory,
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
policy_factory = temp_factory;
// Bind the same policy factory to all FTCORBA related policy
// types since a single policy factory is used to create each of
// the different types of FTCORBA policies.
CORBA::PolicyType type = FT::HEARTBEAT_ENABLED_POLICY;
info->register_policy_factory (type,
policy_factory.in ());
}
示例2: sizeof
void
TAO_RT_ORBInitializer::register_policy_factories (
PortableInterceptor::ORBInitInfo_ptr info)
{
// The RTCorba policy factory is stateless and reentrant, so share a
// single instance between all ORBs.
if (CORBA::is_nil (this->policy_factory_.in ()))
{
PortableInterceptor::PolicyFactory_ptr policy_factory;
ACE_NEW_THROW_EX (policy_factory,
TAO_RT_PolicyFactory,
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
this->policy_factory_ = policy_factory;
}
// Bind the same policy factory to all RTCORBA related policy
// types since a single policy factory is used to create each of
// the different types of RTCORBA policies.
static CORBA::PolicyType const type[] = {
RTCORBA::PRIORITY_MODEL_POLICY_TYPE,
RTCORBA::THREADPOOL_POLICY_TYPE,
RTCORBA::SERVER_PROTOCOL_POLICY_TYPE,
RTCORBA::CLIENT_PROTOCOL_POLICY_TYPE,
RTCORBA::PRIVATE_CONNECTION_POLICY_TYPE,
RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE
};
const CORBA::PolicyType *end =
type + sizeof (type) / sizeof (type[0]);
for (CORBA::PolicyType const * i = type;
i != end;
++i)
{
try
{
info->register_policy_factory (*i, this->policy_factory_.in ());
}
catch (const ::CORBA::BAD_INV_ORDER& ex)
{
if (ex.minor () == (CORBA::OMGVMCID | 16))
{
// The factory is already there, it happens because the
// magic initializer in PortableServer.cpp registers
// with the ORB multiple times. This is an indication
// that we should do no more work in this
// ORBInitializer.
return;
}
throw;
}
}
}
示例3:
void
TAO::Security::ORBInitializer::register_policy_factories (
PortableInterceptor::ORBInitInfo_ptr info)
{
// Register the security policy factories.
if (CORBA::is_nil (this->policy_factory_.in ()))
{
PortableInterceptor::PolicyFactory_ptr policy_factory;
ACE_NEW_THROW_EX (policy_factory,
TAO::Security::PolicyFactory,
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
this->policy_factory_ = policy_factory;
}
// Bind the same policy factory to all security related policy
// types since a single policy factory is used to create each of
// the different types of security policies.
CORBA::PolicyType type;
type = ::Security::SecQOPPolicy;
info->register_policy_factory (type, this->policy_factory_.in ());
type = ::Security::SecMechanismsPolicy;
info->register_policy_factory (type, this->policy_factory_.in ());
type = ::Security::SecInvocationCredentialsPolicy;
info->register_policy_factory (type, this->policy_factory_.in ());
type = ::Security::SecFeaturePolicy; // Deprecated
info->register_policy_factory (type, this->policy_factory_.in ());
type = ::Security::SecDelegationDirectivePolicy;
info->register_policy_factory (type, this->policy_factory_.in ());
type = ::Security::SecEstablishTrustPolicy;
info->register_policy_factory (type, this->policy_factory_.in ());
type = SecurityLevel3::ContextEstablishmentPolicyType;
info->register_policy_factory (type, this->policy_factory_.in ());
type = SecurityLevel3::ObjectCredentialsPolicyType;
info->register_policy_factory (type, this->policy_factory_.in ());
// ----------------------------------------------------------------
}