diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-10-23 10:03:19 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-10-23 10:03:19 +0000 |
commit | babcb84bcef67a0718b81b23caf4593afb5ba4c6 (patch) | |
tree | ae0eb6fa77b9d9753e97f55b09c48731e3f807d8 /TAO/tao/ORBInitializer_Registry.h | |
parent | 79ee5b3d7d05d1a6311cc8aacaa2e47159188f6b (diff) | |
download | ATCD-babcb84bcef67a0718b81b23caf4593afb5ba4c6.tar.gz |
ChangeLogTag:Mon Oct 23 02:49:25 2000 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO/tao/ORBInitializer_Registry.h')
-rw-r--r-- | TAO/tao/ORBInitializer_Registry.h | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/TAO/tao/ORBInitializer_Registry.h b/TAO/tao/ORBInitializer_Registry.h new file mode 100644 index 00000000000..2a14407efa5 --- /dev/null +++ b/TAO/tao/ORBInitializer_Registry.h @@ -0,0 +1,95 @@ +// -*- C++ -*- +// +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO +// +// = FILENAME +// ORBInitializer_Registry.h +// +// = AUTHOR +// Ossama Othman <ossama@uci.edu> +// +// ============================================================================ + +#ifndef TAO_ORB_INITIALIZER_REGISTRY_H +#define TAO_ORB_INITIALIZER_REGISTRY_H + +#include "ace/pre.h" + +#include "tao/TAO_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "PortableInterceptorC.h" +#include "tao/TAO_Singleton.h" +#include "ace/Containers_T.h" + + +/// Global list that contains all portable interceptor ORB +/// initializers. +class TAO_Export TAO_ORBInitializer_Registry +{ + friend class TAO_Singleton<TAO_ORBInitializer_Registry, ACE_SYNCH_MUTEX>; + friend void PortableInterceptor::register_orb_initializer ( + PortableInterceptor::ORBInitializer_ptr init, + CORBA::Environment &); + friend CORBA::ORB_ptr CORBA::ORB_init (int &, + char *argv[], + const char *, + CORBA_Environment &); + +protected: + + TAO_ORBInitializer_Registry (void); + ///< Only allow this class to be instantiated as a singleton + ///< instance, so declare the constructor as protected. + + ~TAO_ORBInitializer_Registry (void); + ///< Destructor. Releases duplicated ORBInitializer references. + + void register_orb_initializer ( + PortableInterceptor::ORBInitializer_ptr init, + CORBA::Environment &ACE_TRY_ENV); + ///< Register an ORBInitializer with the underlying ORBInitializer + ///< sequence. + + void pre_init (PortableInterceptor::ORBInitInfo_ptr info, + CORBA::Environment &ACE_TRY_ENV); + ///< Begin initialization of all registered ORBInitializers before + ///< the ORB itself is initialized. + + void post_init (PortableInterceptor::ORBInitInfo_ptr info, + CORBA::Environment &ACE_TRY_ENV); + ///< Complete initialization of all registered ORBInitializers after + ///< the ORB has been initialized. + + static TAO_ORBInitializer_Registry *instance (void); + // Return a unique instance + +private: + + /// Prevent copying + ACE_UNIMPLEMENTED_FUNC ( + TAO_ORBInitializer_Registry (const TAO_ORBInitializer_Registry &)) + ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_ORBInitializer_Registry &)) + +private: + + ACE_Array_Base<PortableInterceptor::ORBInitializer_ptr> initializers_; + ///< Dynamic array containing registered ORBInitializers. + +}; + +#if defined (__ACE_INLINE__) +# include "tao/ORBInitializer_Registry.inl" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" + +#endif /* TAO_ORB_INITIALIZER_REGISTRY_H */ |