00001 //$Id: TkResource_Factory.cpp 84443 2009-02-12 20:26:35Z johnnyw $ 00002 00003 #include "tao/TkResource/TkResource_Factory.h" 00004 #include "tao/debug.h" 00005 #include "ace/TkReactor/TkReactor.h" 00006 00007 ACE_RCSID( TAO_TkResource, 00008 TkResource_Factory, 00009 "$Id: TkResource_Factory.cpp 84443 2009-02-12 20:26:35Z johnnyw $"); 00010 00011 00012 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00013 00014 namespace TAO 00015 { 00016 00017 TkResource_Factory::TkResource_Factory (void) 00018 : reactor_impl_ (0) 00019 { 00020 } 00021 00022 ACE_Reactor_Impl * 00023 TkResource_Factory::reactor_impl (void) 00024 { 00025 // synchronized by external locks 00026 if (!this->reactor_impl_) 00027 { 00028 ACE_NEW_RETURN (this->reactor_impl_, 00029 ACE_TkReactor (), 00030 0); 00031 00032 if (TAO_debug_level > 0) 00033 ACE_DEBUG ((LM_DEBUG, 00034 "TAO (%P|%t) - ACE_TkReactor created\n")); 00035 } 00036 00037 return this->reactor_impl_; 00038 } 00039 } 00040 00041 TAO_END_VERSIONED_NAMESPACE_DECL