diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-05-19 07:33:55 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-05-19 07:33:55 +0000 |
commit | c38d5ecd4c9f3885a104bf4b35c918907fb3bfbb (patch) | |
tree | dfe7b79d9a6b3b607c31b58f3eea9bad07583e4a /TAO/tao/TSS_Resources.cpp | |
parent | a9e9d11f53973d7b24541e9e86a728edec0e40b0 (diff) | |
download | ATCD-c38d5ecd4c9f3885a104bf4b35c918907fb3bfbb.tar.gz |
ChangeLogTag:Thu May 19 00:29:35 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/tao/TSS_Resources.cpp')
-rw-r--r-- | TAO/tao/TSS_Resources.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/TAO/tao/TSS_Resources.cpp b/TAO/tao/TSS_Resources.cpp index 1085b0e68bb..516a081dc82 100644 --- a/TAO/tao/TSS_Resources.cpp +++ b/TAO/tao/TSS_Resources.cpp @@ -2,32 +2,43 @@ #include "TSS_Resources.h" #include "GUIResource_Factory.h" +#include "TAO_Singleton.h" + ACE_RCSID (tao, TSS_Resources, "$Id$") + TAO_TSS_Resources::TAO_TSS_Resources (void) : poa_current_impl_ (0) - , rtscheduler_current_impl_ (0) - , rtscheduler_previous_current_impl_ (0) - , default_environment_ (&this->tss_environment_) + , rtscheduler_current_impl_ (0) + , rtscheduler_previous_current_impl_ (0) + , default_environment_ (&this->tss_environment_) #if (TAO_HAS_CORBA_MESSAGING == 1) , policy_current_ (&this->initial_policy_current_) #endif /* TAO_HAS_CORBA_MESSAGING == 1 */ - , gui_resource_factory_ (0) + , gui_resource_factory_ (0) { } TAO_TSS_Resources::~TAO_TSS_Resources (void) { - if (gui_resource_factory_) - delete gui_resource_factory_; - gui_resource_factory_ = 0; + delete gui_resource_factory_; +} + +TAO_TSS_Resources * +TAO_TSS_Resources::instance (void) +{ + // Hide the template instantiation to prevent multiple instances + // from being created. + + return + TAO_TSS_Singleton<TAO_TSS_Resources, TAO_SYNCH_MUTEX>::instance (); } // **************************************************************** |