#include <PI_PolicyFactory.h>
Inheritance diagram for TAO_PI_PolicyFactory:


Public Member Functions | |
| CORBA::Policy_ptr | create_policy (CORBA::PolicyType type, const CORBA::Any &value) |
Definition at line 34 of file PI_PolicyFactory.h.
| TAO_BEGIN_VERSIONED_NAMESPACE_DECL CORBA::Policy_ptr TAO_PI_PolicyFactory::create_policy | ( | CORBA::PolicyType | type, | |
| const CORBA::Any & | value | |||
| ) |
Definition at line 17 of file PI_PolicyFactory.cpp.
References ACE_NEW_THROW_EX, CORBA::BAD_POLICY_TYPE, CORBA::BAD_POLICY_VALUE, CORBA::COMPLETED_NO, and TAO::VMCID.
00020 { 00021 if (type == PortableInterceptor::PROCESSING_MODE_POLICY_TYPE) 00022 { 00023 TAO_ProcessingModePolicy *processing_mode_policy = 0; 00024 PortableInterceptor::ProcessingMode policy_value; 00025 00026 if ((value >>= policy_value) == 0) 00027 { 00028 throw ::CORBA::PolicyError (CORBA::BAD_POLICY_VALUE); 00029 } 00030 00031 ACE_NEW_THROW_EX (processing_mode_policy, 00032 TAO_ProcessingModePolicy (policy_value), 00033 CORBA::NO_MEMORY (TAO::VMCID, 00034 CORBA::COMPLETED_NO)); 00035 00036 return processing_mode_policy; 00037 } 00038 00039 throw ::CORBA::PolicyError (CORBA::BAD_POLICY_TYPE); 00040 }
1.4.7