Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / PolicyFactory_Registry_Adapter.h
blobe359b8048719c72badf5ebc70863b44014eaf42c
1 // -*- C++ -*-
3 // ===================================================================
4 /**
5 * @file PolicyFactory_Registry_Adapter.h
7 * @author Johnny Willemsen <jwillemsen@remedy.nl>
8 */
9 // ===================================================================
11 #ifndef TAO_POLICY_FACTORY_REGISTRY_ADAPTER_H
12 #define TAO_POLICY_FACTORY_REGISTRY_ADAPTER_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "tao/TAO_Export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Basic_Types.h"
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 //-- Forward Declarations--
27 namespace CORBA
29 typedef ULong PolicyType;
31 class Policy;
32 typedef Policy *Policy_ptr;
34 class Any;
37 namespace PortableInterceptor
39 class PolicyFactory;
40 typedef PolicyFactory *PolicyFactory_ptr;
43 namespace TAO
45 /**
46 * @class PolicyFactory_Registry_Adapter
48 * @brief ORB-specific PortableInterceptor::PolicyFactory registry.
50 * Class that offers an interface to the ORB to load and manipulate
51 * PolicyFactory_Registry
53 class TAO_Export PolicyFactory_Registry_Adapter
55 public:
56 virtual ~PolicyFactory_Registry_Adapter ();
58 /// Register a PolicyFactory with the underlying PolicyFactory
59 /// sequence. This method should only be called during ORB
60 /// initialization.
61 virtual void register_policy_factory (
62 CORBA::PolicyType type,
63 PortableInterceptor::PolicyFactory_ptr policy_factory) = 0;
65 /// Construct a policy of the given type with the information
66 /// contained in the CORBA::Any @a value.
67 virtual CORBA::Policy_ptr create_policy (CORBA::PolicyType type,
68 const CORBA::Any &value) = 0;
70 /// Create an empty policy, usually to be filled in later by
71 /// demarshaling.
72 virtual CORBA::Policy_ptr _create_policy (CORBA::PolicyType type) = 0;
74 /// Check if a @c PolicyFactory corresponding to the given type,
75 /// exists.
76 virtual bool factory_exists (CORBA::PolicyType & type) const = 0;
80 TAO_END_VERSIONED_NAMESPACE_DECL
82 #include /**/ "ace/post.h"
84 #endif /* TAO_POLICY_FACTORY_REGISTRY_ADAPTER_H */