00001 // -*- C++ -*- 00002 00003 // =================================================================== 00004 /** 00005 * @file PolicyFactory_Registry_Adapter.h 00006 * 00007 * PolicyFactory_Registry_Adapter.h,v 1.4 2005/11/02 11:03:26 ossama Exp 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 #include "ace/CORBA_macros.h" 00027 00028 00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00030 00031 //-- Forward Declarations-- 00032 namespace CORBA 00033 { 00034 typedef ULong PolicyType; 00035 00036 class Policy; 00037 typedef Policy *Policy_ptr; 00038 00039 class Any; 00040 00041 class Environment; 00042 } 00043 00044 namespace PortableInterceptor 00045 { 00046 class PolicyFactory; 00047 typedef PolicyFactory *PolicyFactory_ptr; 00048 } 00049 00050 namespace TAO 00051 { 00052 /** 00053 * @class PolicyFactory_Registry_Adapter 00054 * 00055 * @brief ORB-specific PortableInterceptor::PolicyFactory registry. 00056 * 00057 * Class that offers an interface to the ORB to load and manipulate 00058 * PolicyFactory_Registry 00059 */ 00060 class TAO_Export PolicyFactory_Registry_Adapter 00061 { 00062 public: 00063 virtual ~PolicyFactory_Registry_Adapter (void); 00064 00065 /// Register a PolicyFactory with the underlying PolicyFactory 00066 /// sequence. This method should only be called during ORB 00067 /// initialization. 00068 virtual void register_policy_factory ( 00069 CORBA::PolicyType type, 00070 PortableInterceptor::PolicyFactory_ptr policy_factory 00071 ACE_ENV_ARG_DECL) = 0; 00072 00073 /// Construct a policy of the given type with the information 00074 /// contained in the CORBA::Any @a value. 00075 virtual CORBA::Policy_ptr create_policy (CORBA::PolicyType type, 00076 const CORBA::Any &value 00077 ACE_ENV_ARG_DECL) = 0; 00078 00079 /// Create an empty policy, usually to be filled in later by 00080 /// demarshaling. 00081 virtual CORBA::Policy_ptr _create_policy (CORBA::PolicyType type 00082 ACE_ENV_ARG_DECL) = 0; 00083 00084 /// Check if a @c PolicyFactory corresponding to the given type, 00085 /// exists. 00086 virtual bool factory_exists (CORBA::PolicyType & type) const = 0; 00087 }; 00088 } 00089 00090 TAO_END_VERSIONED_NAMESPACE_DECL 00091 00092 #include /**/ "ace/post.h" 00093 00094 #endif /* TAO_POLICY_FACTORY_REGISTRY_ADAPTER_H */