diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-04-18 22:04:50 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-04-18 22:04:50 +0000 |
commit | 96be97bafb1bc8ab21cea073f9876a6db5662c75 (patch) | |
tree | 2aa67ee3daf3d7152498fea477f645eb0c9fa73b /TAO/tao/ORBInitializer_Registry.h | |
parent | fefdec9e40e7288448d346fad7f378e42d306891 (diff) | |
download | ATCD-96be97bafb1bc8ab21cea073f9876a6db5662c75.tar.gz |
ChangeLogTag:Thu Apr 18 15:03:56 2002 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO/tao/ORBInitializer_Registry.h')
-rw-r--r-- | TAO/tao/ORBInitializer_Registry.h | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/TAO/tao/ORBInitializer_Registry.h b/TAO/tao/ORBInitializer_Registry.h index 178888bebb3..7516db45f8d 100644 --- a/TAO/tao/ORBInitializer_Registry.h +++ b/TAO/tao/ORBInitializer_Registry.h @@ -22,7 +22,6 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "PortableInterceptorC.h" -#include "TAO_Singleton.h" #include "ace/Array_Base.h" /** @@ -30,10 +29,17 @@ * * @brief Global list that contains all portable interceptor ORB * initializers. + * + * @note This class should be instantiated via its instance() method. + * Normally this would be enforced by making the constructor + * protected but that forces a friend declaration containing a + * template type (TAO_Singleton) with a static member to be + * introduced. In turn, this potentially introduces problems in + * MS Windows DLL environments due to the occurance of multiple + * singleton instances. There should only be one! */ class TAO_Export TAO_ORBInitializer_Registry { - friend class TAO_Export TAO_Singleton<TAO_ORBInitializer_Registry, TAO_SYNCH_MUTEX>; friend void PortableInterceptor::register_orb_initializer ( PortableInterceptor::ORBInitializer_ptr init ACE_ENV_ARG_DECL_NOT_USED); @@ -42,17 +48,23 @@ class TAO_Export TAO_ORBInitializer_Registry const char *, CORBA_Environment &); -protected: +public: /// Only allow this class to be instantiated as a singleton /// instance, so declare the constructor as protected. + /** + * @note See the note in the class description for an explanation of + * why this constructor is not protected. + */ TAO_ORBInitializer_Registry (void); /// Destructor. Releases duplicated ORBInitializer references. ~TAO_ORBInitializer_Registry (void); - ///< Register an ORBInitializer with the underlying ORBInitializer - ///< array. +protected: + + /// Register an ORBInitializer with the underlying ORBInitializer + /// array. void register_orb_initializer ( PortableInterceptor::ORBInitializer_ptr init ACE_ENV_ARG_DECL); @@ -84,15 +96,6 @@ private: }; -#if defined (__ACE_INLINE__) -# include "tao/ORBInitializer_Registry.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (_MSC_VER) -// Re-enable the warning. -#pragma warning(default:4231) -#endif /* _MSC_VER */ - #include "ace/post.h" #endif /* TAO_ORB_INITIALIZER_REGISTRY_H */ |