blob: 8562f0e0bd201f2a7da144eac19febadaaa77309 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// $Id$
#if (TAO_HAS_RT_CORBA == 1)
# include "tao/RT_Policy_i.h"
# include "tao/RTCORBAC.h"
#endif /* (TAO_HAS_RT_CORBA == 1) */
ACE_INLINE CORBA::Policy *
TAO_Policy_Factory::create_policy (CORBA::PolicyType ptype)
{
CORBA::Policy_ptr policy = 0;
#if (TAO_HAS_RT_CORBA == 1)
if (ptype == RTCORBA::PRIORITY_MODEL_POLICY_TYPE)
ACE_NEW_RETURN (policy, TAO_PriorityModelPolicy, 0);
if (ptype == RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE)
ACE_NEW_RETURN (policy, TAO_PriorityBandedConnectionPolicy, 0);
if (ptype == RTCORBA::CLIENT_PROTOCOL_POLICY_TYPE)
ACE_NEW_RETURN (policy, TAO_ClientProtocolPolicy, 0);
#else
ACE_UNUSED_ARG (ptype);
#endif /* (TAO_HAS_RT_CORBA == 1) */
return policy;
}
|