TAO_PI_PolicyFactory Class Reference

Policy factory for all PortableInterceptor related policies. More...

#include <PI_PolicyFactory.h>

Inheritance diagram for TAO_PI_PolicyFactory:

Inheritance graph
[legend]
Collaboration diagram for TAO_PI_PolicyFactory:

Collaboration graph
[legend]
List of all members.

Public Member Functions

CORBA::Policy_ptr create_policy (CORBA::PolicyType type, const CORBA::Any &value) throw (CORBA::SystemException, CORBA::PolicyError)

Detailed Description

Policy factory for all PortableInterceptor related policies.

Definition at line 34 of file PI_PolicyFactory.h.


Member Function Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL CORBA::Policy_ptr TAO_PI_PolicyFactory::create_policy CORBA::PolicyType  type,
const CORBA::Any &  value
throw (CORBA::SystemException, CORBA::PolicyError)
 

Definition at line 15 of file PI_PolicyFactory.cpp.

References ACE_CHECK_RETURN, ACE_NEW_THROW_EX, and ACE_THROW_RETURN.

00021 {
00022   if (type == PortableInterceptor::PROCESSING_MODE_POLICY_TYPE)
00023     {
00024       TAO_ProcessingModePolicy *processing_mode_policy = 0;
00025       PortableInterceptor::ProcessingMode policy_value;
00026 
00027       if ((value >>= policy_value) == 0)
00028         {
00029           ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_VALUE),
00030                             CORBA::Policy::_nil ());
00031         }
00032 
00033       ACE_NEW_THROW_EX (processing_mode_policy,
00034                         TAO_ProcessingModePolicy (policy_value),
00035                         CORBA::NO_MEMORY (TAO::VMCID,
00036                                           CORBA::COMPLETED_NO));
00037       ACE_CHECK_RETURN (CORBA::Policy::_nil ());
00038 
00039       return processing_mode_policy;
00040     }
00041 
00042   ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE),
00043                     CORBA::Policy::_nil ());
00044 }


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 12:52:33 2006 for TAO_PI by doxygen 1.3.6