QtResource_Factory.cpp

Go to the documentation of this file.
00001 //QtResource_Factory.cpp,v 1.5 2006/04/19 08:47:46 jwillemsen Exp
00002 
00003 #include "tao/QtResource_Factory.h"
00004 #include "tao/debug.h"
00005 #include "ace/QtReactor.h"
00006 
00007 ACE_RCSID (TAO_QtResource,
00008            QtResource_Factory,
00009            "QtResource_Factory.cpp,v 1.5 2006/04/19 08:47:46 jwillemsen Exp");
00010 
00011 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00012 
00013 namespace TAO
00014 {
00015   QtResource_Factory::QtResource_Factory (QApplication *qapp)
00016     : reactor_impl_ (0)
00017     , qapp_ (qapp)
00018   {
00019   }
00020 
00021   ACE_Reactor_Impl *
00022   QtResource_Factory::reactor_impl (void)
00023   {    // synchronized by external locks
00024     if (this->qapp_ == 0)
00025       {
00026         ACE_ERROR ((LM_ERROR,
00027                     "TAO (%P|%t) - QApplication is undefined.",
00028                     " 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_QtReactor (qapp_),
00036                         0);
00037 
00038         if (TAO_debug_level > 0)
00039           ACE_DEBUG ((LM_DEBUG,
00040                       "TAO (%P|%t) - ACE_QtReactor created\n"));
00041       }
00042 
00043     return this->reactor_impl_;
00044   }
00045 }
00046 
00047 TAO_END_VERSIONED_NAMESPACE_DECL

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