00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file QtResource_Factory.h 00006 * 00007 * QtResource_Factory.h,v 1.4 2005/11/02 11:03:26 ossama Exp 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/TAO_QtResource_Export.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 #include <qapplication.h> 00024 #include "ace/QtReactor.h" 00025 #include "tao/GUIResource_Factory.h" 00026 00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00028 00029 namespace TAO 00030 { 00031 /** 00032 * @class QtResource_Factory 00033 * 00034 * @brief TAO_GUI_Resource_Factory for creating QtReactor. 00035 * 00036 * This factory is intended for creating QtReactor for ORB. This 00037 * factory can be feed into ORB using 00038 * TAO_ORB_Core::set_gui_resource_factory method which is usually 00039 * done by TAO_QtResource_Loader. 00040 */ 00041 class TAO_QtResource_Export QtResource_Factory : public GUIResource_Factory 00042 { 00043 public: 00044 00045 QtResource_Factory (QApplication *qapp_); 00046 00047 protected: 00048 00049 /// Create or obtain current reactor implementation 00050 virtual ACE_Reactor_Impl *reactor_impl (void); 00051 00052 private: 00053 00054 /// Reactor created by this factory. 00055 ACE_QtReactor *reactor_impl_; 00056 00057 /// QApplication running reactor 00058 QApplication *qapp_; 00059 00060 /// For internal locking. 00061 TAO_SYNCH_MUTEX lock_; 00062 }; 00063 } 00064 00065 TAO_END_VERSIONED_NAMESPACE_DECL 00066 00067 #include /**/ "ace/post.h" 00068 #endif /* TAO_QTRESOURCE_FACTORY_H */