00001 //$Id: FoxResource_Factory.cpp 84443 2009-02-12 20:26:35Z johnnyw $ 00002 00003 #include "tao/FoxResource/FoxResource_Factory.h" 00004 #include "tao/debug.h" 00005 #include "ace/FoxReactor/FoxReactor.h" 00006 00007 ACE_RCSID( TAO_FoxResource, 00008 FoxResource_Factory, 00009 "$Id: FoxResource_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 FoxResource_Factory::FoxResource_Factory (FXApp *app) 00018 : reactor_impl_ (0) 00019 , fxapp_ (app) 00020 { 00021 } 00022 00023 ACE_Reactor_Impl * 00024 FoxResource_Factory::reactor_impl (void) 00025 { 00026 if (this->fxapp_ == 0) 00027 return 0; 00028 00029 // synchronized by external locks 00030 if (!this->reactor_impl_) 00031 { 00032 ACE_NEW_RETURN (this->reactor_impl_, 00033 ACE_FoxReactor (), 00034 0); 00035 00036 if (TAO_debug_level > 0) 00037 ACE_DEBUG ((LM_DEBUG, 00038 "TAO (%P|%t) - ACE_FoxReactor created\n")); 00039 } 00040 00041 return this->reactor_impl_; 00042 } 00043 } 00044 00045 TAO_END_VERSIONED_NAMESPACE_DECL