Public Member Functions

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

CORBA::Policy_ptr TAO_PI_PolicyFactory::create_policy ( CORBA::PolicyType  type,
const CORBA::Any value 
)

Definition at line 17 of file PI_PolicyFactory.cpp.

{
  if (type == PortableInterceptor::PROCESSING_MODE_POLICY_TYPE)
    {
      TAO_ProcessingModePolicy *processing_mode_policy = 0;
      PortableInterceptor::ProcessingMode policy_value;

      if ((value >>= policy_value) == 0)
        {
          throw ::CORBA::PolicyError (CORBA::BAD_POLICY_VALUE);
        }

      ACE_NEW_THROW_EX (processing_mode_policy,
                        TAO_ProcessingModePolicy (policy_value),
                        CORBA::NO_MEMORY (TAO::VMCID,
                                          CORBA::COMPLETED_NO));

      return processing_mode_policy;
    }

  throw ::CORBA::PolicyError (CORBA::BAD_POLICY_TYPE);
}


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines