00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file QtResource_Factory.h 00006 * 00007 * $Id: QtResource_Factory.h 78128 2007-04-20 08:07:58Z johnnyw $ 00008 * 00009 * @author Balachandran Natarajan <bala@dre.vanderbilt.edu> 00010 * @author Marek Brudka <mbrudka@aster.pl> 00011 */ 00012 //============================================================================= 00013 #ifndef TAO_QTRESOURCE_FACTORY_H 00014 #define TAO_QTRESOURCE_FACTORY_H 00015 #include /**/ "ace/pre.h" 00016 00017 #include "tao/QtResource/TAO_QtResource_Export.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 #include "ace/QtReactor/QtReactor.h" 00024 #include "tao/GUIResource_Factory.h" 00025 00026 class QApplication; 00027 00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00029 00030 namespace TAO 00031 { 00032 /** 00033 * @class QtResource_Factory 00034 * 00035 * @brief TAO_GUI_Resource_Factory for creating QtReactor. 00036 * 00037 * This factory is intended for creating QtReactor for ORB. This 00038 * factory can be feed into ORB using 00039 * TAO_ORB_Core::set_gui_resource_factory method which is usually 00040 * done by TAO_QtResource_Loader. 00041 */ 00042 class TAO_QtResource_Export QtResource_Factory : public GUIResource_Factory 00043 { 00044 public: 00045 00046 QtResource_Factory (QApplication *qapp_); 00047 00048 protected: 00049 00050 /// Create or obtain current reactor implementation 00051 virtual ACE_Reactor_Impl *reactor_impl (void); 00052 00053 private: 00054 00055 /// Reactor created by this factory. 00056 ACE_QtReactor *reactor_impl_; 00057 00058 /// QApplication running reactor 00059 QApplication *qapp_; 00060 }; 00061 } 00062 00063 TAO_END_VERSIONED_NAMESPACE_DECL 00064 00065 #include /**/ "ace/post.h" 00066 #endif /* TAO_QTRESOURCE_FACTORY_H */