PolicyFactory_Registry_Adapter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   PolicyFactory_Registry_Adapter.h
00006  *
00007  *  $Id: PolicyFactory_Registry_Adapter.h 76995 2007-02-11 12:51:42Z johnnyw $
00008  *
00009  *  @author Johnny Willemsen  <jwillemsen@remedy.nl>
00010  */
00011 // ===================================================================
00012 
00013 #ifndef TAO_POLICY_FACTORY_REGISTRY_ADAPTER_H
00014 #define TAO_POLICY_FACTORY_REGISTRY_ADAPTER_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include /**/ "tao/TAO_Export.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "tao/Basic_Types.h"
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 //-- Forward Declarations--
00029 namespace CORBA
00030 {
00031   typedef ULong PolicyType;
00032 
00033   class Policy;
00034   typedef Policy *Policy_ptr;
00035 
00036   class Any;
00037 }
00038 
00039 namespace PortableInterceptor
00040 {
00041   class PolicyFactory;
00042   typedef PolicyFactory *PolicyFactory_ptr;
00043 }
00044 
00045 namespace TAO
00046 {
00047   /**
00048    * @class PolicyFactory_Registry_Adapter
00049    *
00050    * @brief ORB-specific PortableInterceptor::PolicyFactory registry.
00051    *
00052    * Class that offers an interface to the ORB to load and manipulate
00053    * PolicyFactory_Registry
00054    */
00055   class TAO_Export PolicyFactory_Registry_Adapter
00056   {
00057   public:
00058     virtual ~PolicyFactory_Registry_Adapter (void);
00059 
00060     /// Register a PolicyFactory with the underlying PolicyFactory
00061     /// sequence.  This method should only be called during ORB
00062     /// initialization.
00063     virtual void register_policy_factory (
00064       CORBA::PolicyType type,
00065       PortableInterceptor::PolicyFactory_ptr policy_factory) = 0;
00066 
00067     /// Construct a policy of the given type with the information
00068     /// contained in the CORBA::Any @a value.
00069     virtual CORBA::Policy_ptr create_policy (CORBA::PolicyType type,
00070                                              const CORBA::Any &value) = 0;
00071 
00072     /// Create an empty policy, usually to be filled in later by
00073     /// demarshaling.
00074     virtual CORBA::Policy_ptr _create_policy (CORBA::PolicyType type) = 0;
00075 
00076     /// Check if a @c PolicyFactory corresponding to the given type,
00077     /// exists.
00078     virtual bool factory_exists (CORBA::PolicyType & type) const = 0;
00079   };
00080 }
00081 
00082 TAO_END_VERSIONED_NAMESPACE_DECL
00083 
00084 #include /**/ "ace/post.h"
00085 
00086 #endif  /* TAO_POLICY_FACTORY_REGISTRY_ADAPTER_H */

Generated on Tue Feb 2 17:37:52 2010 for TAO by  doxygen 1.4.7