Use =default for skeleton copy constructor
[ACE_TAO.git] / TAO / tao / IORInterceptor / IORInfo.h
blob7ce42e6ee7c6f607fd9a18e18b39f0ef679041eb
1 // -*- C++ -*-
3 // ===================================================================
4 /**
5 * @file IORInfo.h
7 * @author Ossama Othman <ossama@uci.edu>
8 */
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)
19 # 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.
26 #if defined(_MSC_VER)
27 #pragma warning(push)
28 #pragma warning(disable:4250)
29 #endif /* _MSC_VER */
32 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
34 /// Forward declarations.
35 class TAO_Root_POA;
37 /**
38 * @class TAO_IORInfo
40 * @brief This class exposes an interface that allows IORInterceptors add
41 * tagged components to IORs.
43 class TAO_IORInfo
44 : public virtual PortableInterceptor::IORInfo,
45 public virtual ::CORBA::LocalObject
47 public:
48 /// Constructor.
49 TAO_IORInfo (TAO_Root_POA *poa);
51 /**
52 * @name PortableInterceptor::IORInfo Methods
54 * Methods exposed by the PortableInterceptor::IORInfo interface.
56 //@{
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
65 /// ProfileId.
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);
81 //@}
83 /// Invalidate this IORInfo instance.
84 /**
85 * Once the IOR interception points have been invoked, this IORInfo
86 * instance is no longer valid.
88 void invalidate ();
90 /// Inform the this IORInfo object that the
91 /// IORInterceptor::components_established() interception point has
92 /// been called.
93 /**
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 ();
101 protected:
102 /// Protected destructor to enforce proper memory management through
103 /// the reference counting mechanism.
104 ~TAO_IORInfo ();
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
110 * that case.
112 void check_validity ();
114 private:
115 TAO_IORInfo (const TAO_IORInfo &) = delete;
116 void operator= (const TAO_IORInfo &) = delete;
118 private:
119 /// Pointer to POA
120 TAO_Root_POA * poa_;
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)
140 #pragma warning(pop)
141 #endif /* _MSC_VER */
143 #include /**/ "ace/post.h"
145 #endif /* TAO_IOR_INFO_H */