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)

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
 

Definition at line 17 of file PI_PolicyFactory.cpp.

References ACE_NEW_THROW_EX.

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 }


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 13:30:17 2008 for TAO_PI by doxygen 1.3.6