Policy factory for all PortableInterceptor related policies. More...
#include <PI_PolicyFactory.h>


Public Member Functions | |
| CORBA::Policy_ptr | create_policy (CORBA::PolicyType type, const CORBA::Any &value) |
Policy factory for all PortableInterceptor related policies.
Definition at line 34 of file PI_PolicyFactory.h.
| CORBA::Policy_ptr TAO_PI_PolicyFactory::create_policy | ( | CORBA::PolicyType | type, | |
| const CORBA::Any & | value | |||
| ) |
Definition at line 17 of file PI_PolicyFactory.cpp.
{
if (type == PortableInterceptor::PROCESSING_MODE_POLICY_TYPE)
{
TAO_ProcessingModePolicy *processing_mode_policy = 0;
PortableInterceptor::ProcessingMode policy_value;
if ((value >>= policy_value) == 0)
{
throw ::CORBA::PolicyError (CORBA::BAD_POLICY_VALUE);
}
ACE_NEW_THROW_EX (processing_mode_policy,
TAO_ProcessingModePolicy (policy_value),
CORBA::NO_MEMORY (TAO::VMCID,
CORBA::COMPLETED_NO));
return processing_mode_policy;
}
throw ::CORBA::PolicyError (CORBA::BAD_POLICY_TYPE);
}
1.7.0