3 // ===================================================================
5 * @file ORBInitializer_Registry_Impl.h
7 * @author Ossama Othman <ossama@uci.edu>
9 // ===================================================================
11 #ifndef TAO_PI_ORB_INITIALIZER_REGISTRY_IMPL_H
12 #define TAO_PI_ORB_INITIALIZER_REGISTRY_IMPL_H
14 #include /**/ "ace/pre.h"
16 #include "tao/PI/pi_export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/PI/PI.h"
24 #include "tao/CORBA_methods.h"
25 #include "tao/Objref_VarOut_T.h"
26 #include "tao/ORBInitializer_Registry_Adapter.h"
28 #include "ace/Array_Base.h"
29 #include "ace/Service_Config.h"
30 #include "ace/Recursive_Thread_Mutex.h"
32 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
37 * @class ORBInitializer_Registry
39 * @brief Global list that contains all portable interceptor ORB
42 class ORBInitializer_Registry
43 : public ORBInitializer_Registry_Adapter
46 ORBInitializer_Registry ();
48 /// Added to provide registration for the several static service
49 /// objects, brought in with this ORBInitializer_Registry
50 /// implementation. Note that this is more reliable than using
51 /// static initializers, since multiple copies of the dynamic
52 /// service object will require their own (multiple) copies of the
53 /// dependent static service objects. That is just impossible
54 /// without registering those static services in the same repo, the
55 /// dynamic SO is registered with.
56 virtual int init (int, ACE_TCHAR
*[]);
58 /// Service config fini method, release all ORBInitializers at this
62 /// Register an ORBInitializer with the underlying ORBInitializer
64 virtual void register_orb_initializer (
65 PortableInterceptor::ORBInitializer_ptr init
);
67 /// Begin initialization of all registered ORBInitializers before
68 /// the ORB itself is initialized.
69 virtual size_t pre_init (TAO_ORB_Core
*orb_core
,
72 PortableInterceptor::SlotId
&slotid
);
74 /// Complete initialization of all registered ORBInitializers after
75 /// the ORB has been initialized.
76 virtual void post_init (size_t pre_init_count
,
77 TAO_ORB_Core
*orb_core
,
80 PortableInterceptor::SlotId slotid
);
84 ORBInitializer_Registry (const ORBInitializer_Registry
&) = delete;
85 void operator= (const ORBInitializer_Registry
&) = delete;
88 TAO_SYNCH_RECURSIVE_MUTEX lock_
;
90 /// Dynamic array containing registered ORBInitializers.
91 ACE_Array_Base
<PortableInterceptor::ORBInitializer_var
> initializers_
;
96 ACE_STATIC_SVC_DECLARE (ORBInitializer_Registry
)
97 ACE_FACTORY_DECLARE (TAO_PI
, ORBInitializer_Registry
)
99 TAO_END_VERSIONED_NAMESPACE_DECL
101 #include /**/ "ace/post.h"
103 #endif /* TAO_PI_ORB_INITIALIZER_REGISTRY_IMPL_H */