#include <RT_PolicyFactory.h>
Inheritance diagram for TAO_RT_PolicyFactory:
Public Member Functions | |
CORBA::Policy_ptr | create_policy (CORBA::PolicyType type, const CORBA::Any &value) throw (CORBA::SystemException, CORBA::PolicyError) |
CORBA::Policy_ptr | _create_policy (CORBA::PolicyType type) throw (CORBA::SystemException, CORBA::PolicyError) |
Definition at line 43 of file RT_PolicyFactory.h.
|
Definition at line 53 of file RT_PolicyFactory.cpp. References CORBA::Policy::_nil(), ACE_CHECK_RETURN, ACE_NEW_THROW_EX, and ACE_THROW_RETURN.
00058 { 00059 CORBA::Policy_ptr policy = CORBA::Policy::_nil (); 00060 00061 if (type == RTCORBA::PRIORITY_MODEL_POLICY_TYPE) 00062 { 00063 ACE_NEW_THROW_EX (policy, 00064 TAO_PriorityModelPolicy, 00065 CORBA::NO_MEMORY ( 00066 CORBA::SystemException::_tao_minor_code ( 00067 TAO::VMCID, 00068 ENOMEM), 00069 CORBA::COMPLETED_NO)); 00070 ACE_CHECK_RETURN (CORBA::Policy::_nil ()); 00071 00072 return policy; 00073 } 00074 00075 if (type == RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE) 00076 { 00077 ACE_NEW_THROW_EX (policy, 00078 TAO_PriorityBandedConnectionPolicy, 00079 CORBA::NO_MEMORY ( 00080 CORBA::SystemException::_tao_minor_code ( 00081 TAO::VMCID, 00082 ENOMEM), 00083 CORBA::COMPLETED_NO)); 00084 ACE_CHECK_RETURN (CORBA::Policy::_nil ()); 00085 00086 return policy; 00087 } 00088 00089 if (type == RTCORBA::CLIENT_PROTOCOL_POLICY_TYPE) 00090 { 00091 ACE_NEW_THROW_EX (policy, 00092 TAO_ClientProtocolPolicy, 00093 CORBA::NO_MEMORY ( 00094 CORBA::SystemException::_tao_minor_code ( 00095 TAO::VMCID, 00096 ENOMEM), 00097 CORBA::COMPLETED_NO)); 00098 ACE_CHECK_RETURN (CORBA::Policy::_nil ()); 00099 00100 return policy; 00101 } 00102 00103 ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE), 00104 CORBA::Policy::_nil ()); 00105 } |
|
Definition at line 17 of file RT_PolicyFactory.cpp. References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_PriorityBandedConnectionPolicy::create(), TAO_PrivateConnectionPolicy::create(), TAO_ClientProtocolPolicy::create(), TAO_ServerProtocolPolicy::create(), TAO_ThreadpoolPolicy::create(), and TAO_PriorityModelPolicy::create().
00023 { 00024 if (type == RTCORBA::PRIORITY_MODEL_POLICY_TYPE) 00025 return TAO_PriorityModelPolicy::create (value 00026 ACE_ENV_ARG_PARAMETER); 00027 00028 if (type == RTCORBA::THREADPOOL_POLICY_TYPE) 00029 return TAO_ThreadpoolPolicy::create (value 00030 ACE_ENV_ARG_PARAMETER); 00031 00032 if (type == RTCORBA::SERVER_PROTOCOL_POLICY_TYPE) 00033 return TAO_ServerProtocolPolicy::create (value 00034 ACE_ENV_ARG_PARAMETER); 00035 00036 if (type == RTCORBA::CLIENT_PROTOCOL_POLICY_TYPE) 00037 return TAO_ClientProtocolPolicy::create (value 00038 ACE_ENV_ARG_PARAMETER); 00039 00040 if (type == RTCORBA::PRIVATE_CONNECTION_POLICY_TYPE) 00041 return TAO_PrivateConnectionPolicy::create (value 00042 ACE_ENV_ARG_PARAMETER); 00043 00044 if (type == RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE) 00045 return TAO_PriorityBandedConnectionPolicy::create (value 00046 ACE_ENV_ARG_PARAMETER); 00047 00048 ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE), 00049 CORBA::Policy::_nil ()); 00050 } |