diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2010-10-13 06:20:39 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2010-10-13 06:20:39 +0000 |
commit | aacd0408f68c197b9c2f7da2d9a2df6a13bba971 (patch) | |
tree | c97e91d9224396fa4ed742659a9500137760b34a /ACE/ace/Framework_Component.h | |
parent | 4c8fb3272d43a5a7eef778c7dbacc94ce3a508fc (diff) | |
download | ATCD-aacd0408f68c197b9c2f7da2d9a2df6a13bba971.tar.gz |
Wed Oct 13 06:15:00 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/Framework_Component.h:
* ace/Framework_Component.inl:
* ace/Framework_Component.cpp:
* ace/Framework_Component_T.h:
Use ACE_Copy_Disabled, change c-style cast to const cast, use
sync macros instead of ACE_MT. Thanks to Ranjit Hande
<hande at avaya dot com> for reporting the c-style cast warnings
* tests/Framework_Component_Test.h:
Layout change
Diffstat (limited to 'ACE/ace/Framework_Component.h')
-rw-r--r-- | ACE/ace/Framework_Component.h | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/ACE/ace/Framework_Component.h b/ACE/ace/Framework_Component.h index 0541626ad31..e9b7139d299 100644 --- a/ACE/ace/Framework_Component.h +++ b/ACE/ace/Framework_Component.h @@ -45,6 +45,8 @@ #include "ace/os_include/os_signal.h" #include "ace/Thread_Mutex.h" +#include "ace/Copy_Disabled.h" +#include "ace/Synch_Traits.h" #define ACE_DEFAULT_FRAMEWORK_REPOSITORY_SIZE 1024 @@ -56,7 +58,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * @brief Base class that defines a uniform interface for all managed * framework components. */ -class ACE_Export ACE_Framework_Component +class ACE_Export ACE_Framework_Component : private ACE_Copy_Disabled { public: friend class ACE_Framework_Repository; @@ -74,11 +76,6 @@ protected: virtual ~ACE_Framework_Component (void); private: - // No copy possible - ACE_Framework_Component (const ACE_Framework_Component &); - void operator= (const ACE_Framework_Component &); - -private: /// Pointer to the actual component. const void *this_; @@ -98,7 +95,7 @@ private: * destruction, framework components are destroyed in the reverse order * that they were added originally. */ -class ACE_Export ACE_Framework_Repository +class ACE_Export ACE_Framework_Repository : private ACE_Copy_Disabled { public: // This is just to silence a compiler warning about no public ctors @@ -166,10 +163,6 @@ private: /// order. void compact (void); - /// Disallow copying and assignment. - ACE_Framework_Repository (const ACE_Framework_Repository &); - ACE_Framework_Repository &operator= (const ACE_Framework_Repository &); - private: /// Contains all the framework components. @@ -190,11 +183,8 @@ private: /// unload their components, e.g., ACE_DLL_Manager. static sig_atomic_t shutting_down_; -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - /// Synchronization variable for the MT_SAFE Repository - ACE_Thread_Mutex lock_; -#endif /* ACE_MT_SAFE */ - + /// Synchronization variable for the repository + ACE_SYNCH_MUTEX lock_; }; ACE_END_VERSIONED_NAMESPACE_DECL |