XtResource_Factory.cpp

Go to the documentation of this file.
00001 //XtResource_Factory.cpp,v 1.3 2006/03/10 07:19:07 jtc Exp
00002 
00003 #include "tao/XtResource_Factory.h"
00004 #include "tao/debug.h"
00005 #include "ace/XtReactor.h"
00006 
00007 ACE_RCSID( TAO_XtResource,
00008            XtResource_Factory,
00009            "XtResource_Factory.cpp,v 1.3 2006/03/10 07:19:07 jtc Exp");
00010 
00011 namespace TAO
00012 {
00013 
00014   XtResource_Factory::XtResource_Factory (XtAppContext p_context):
00015     reactor_impl_( 0 ),
00016     context_( p_context )
00017   {
00018   }
00019 
00020   ACE_Reactor_Impl *
00021   XtResource_Factory::reactor_impl (void)
00022   {
00023     // synchronized by external locks
00024     if (this->context_ == 0)
00025     {
00026       ACE_ERROR ((LM_ERROR,
00027                   ACE_TEXT("TAO (%P|%t) - XtAppContext is undefined.")
00028                   ACE_TEXT(" Cannot create ACE_XtReactor \n")));
00029       return 0;
00030     }
00031 
00032     if (!this->reactor_impl_)
00033     {
00034       ACE_NEW_RETURN (this->reactor_impl_,
00035                       ACE_XtReactor (this->context_),
00036                       0);
00037 
00038       if (TAO_debug_level > 0)
00039         ACE_DEBUG ((LM_DEBUG,
00040                     "TAO (%P|%t) - ACE_XtReactor created \n"));
00041     }
00042 
00043     return this->reactor_impl_;
00044   }
00045 }

Generated on Thu Nov 9 11:54:29 2006 for TAO by doxygen 1.3.6