3 // ===================================================================
7 * @author Ossama Othman <ossama@uci.edu>
9 // ===================================================================
11 #ifndef TAO_IOR_INFO_H
12 #define TAO_IOR_INFO_H
14 #include /**/ "ace/pre.h"
16 #include "tao/IORInterceptor/IORInfoC.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/LocalObject.h"
24 // This is to remove "inherits via dominance" warnings from MSVC.
25 // MSVC is being a little too paranoid.
28 #pragma warning(disable:4250)
32 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
34 /// Forward declarations.
40 * @brief This class exposes an interface that allows IORInterceptors add
41 * tagged components to IORs.
44 : public virtual PortableInterceptor::IORInfo
,
45 public virtual ::CORBA::LocalObject
49 TAO_IORInfo (TAO_Root_POA
*poa
);
52 * @name PortableInterceptor::IORInfo Methods
54 * Methods exposed by the PortableInterceptor::IORInfo interface.
57 /// Return the policy matching the given policy type that is in
58 /// effect for the object whose IOR is being created.
59 virtual CORBA::Policy_ptr
get_effective_policy (CORBA::PolicyType type
);
61 /// Add the given tagged component to all profiles.
62 virtual void add_ior_component (const IOP::TaggedComponent
& component
);
64 /// Add the given tagged component to all profiles matching the given
66 virtual void add_ior_component_to_profile (
67 const IOP::TaggedComponent
& component
,
68 IOP::ProfileId profile_id
);
70 virtual char * manager_id ();
72 virtual PortableInterceptor::AdapterState
state ();
74 virtual PortableInterceptor::ObjectReferenceTemplate
*adapter_template ();
76 virtual PortableInterceptor::ObjectReferenceFactory
*current_factory ();
78 virtual void current_factory (
79 PortableInterceptor::ObjectReferenceFactory
* current_factory
);
83 /// Invalidate this IORInfo instance.
85 * Once the IOR interception points have been invoked, this IORInfo
86 * instance is no longer valid.
90 /// Inform the this IORInfo object that the
91 /// IORInterceptor::components_established() interception point has
94 * This method is used to inform the IORInfo object when the
95 * add_ior_component() and add_ior_component_to_profile() methods
96 * are invalid. They are only valid in the
97 * IORInterceptor::establish_components() interception point.
99 void components_established ();
102 /// Protected destructor to enforce proper memory management through
103 /// the reference counting mechanism.
106 /// Check if this IORInfo instance is valid.
108 * Once all IORInterceptor interception points have been called,
109 * this IORInfo object is no longer valid. Throw an exception in
112 void check_validity ();
115 TAO_IORInfo (const TAO_IORInfo
&) = delete;
116 void operator= (const TAO_IORInfo
&) = delete;
122 /// True if the IORInterceptor::components_established()
123 /// interception point was called. False otherwise.
125 * This flag is used to prevent the add_ior_component() and
126 * add_ior_component_to_profile() methods from being incorrectly
127 * called after the IORInterceptor::establish_components()
128 * interception point has been called.
130 CORBA::Boolean components_established_
;
133 TAO_END_VERSIONED_NAMESPACE_DECL
135 #if defined (__ACE_INLINE__)
136 # include "tao/IORInterceptor/IORInfo.inl"
137 #endif /* __ACE_INLINE__ */
139 #if defined(_MSC_VER)
141 #endif /* _MSC_VER */
143 #include /**/ "ace/post.h"
145 #endif /* TAO_IOR_INFO_H */