TAO::QtResource_Factory Class Reference

TAO_GUI_Resource_Factory for creating QtReactor. More...

#include <QtResource_Factory.h>

Inheritance diagram for TAO::QtResource_Factory:

Inheritance graph
[legend]
Collaboration diagram for TAO::QtResource_Factory:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 QtResource_Factory (QApplication *qapp_)

Protected Member Functions

virtual ACE_Reactor_Implreactor_impl (void)
 Create or obtain current reactor implementation.


Private Attributes

ACE_QtReactorreactor_impl_
 Reactor created by this factory.

QApplication * qapp_
 QApplication running reactor.

TAO_SYNCH_MUTEX lock_
 For internal locking.


Detailed Description

TAO_GUI_Resource_Factory for creating QtReactor.

This factory is intended for creating QtReactor for ORB. This factory can be feed into ORB using TAO_ORB_Core::set_gui_resource_factory method which is usually done by TAO_QtResource_Loader.

Definition at line 41 of file QtResource_Factory.h.


Constructor & Destructor Documentation

TAO::QtResource_Factory::QtResource_Factory QApplication *  qapp_  ) 
 

Definition at line 15 of file QtResource_Factory.cpp.

00016     : reactor_impl_ (0)
00017     , qapp_ (qapp)
00018   {
00019   }


Member Function Documentation

ACE_Reactor_Impl * TAO::QtResource_Factory::reactor_impl void   )  [protected, virtual]
 

Create or obtain current reactor implementation.

Implements TAO::GUIResource_Factory.

Definition at line 22 of file QtResource_Factory.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_NEW_RETURN, LM_DEBUG, LM_ERROR, and TAO_debug_level.

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   }


Member Data Documentation

TAO_SYNCH_MUTEX TAO::QtResource_Factory::lock_ [private]
 

For internal locking.

Reimplemented from TAO::GUIResource_Factory.

Definition at line 61 of file QtResource_Factory.h.

QApplication* TAO::QtResource_Factory::qapp_ [private]
 

QApplication running reactor.

Definition at line 58 of file QtResource_Factory.h.

ACE_QtReactor* TAO::QtResource_Factory::reactor_impl_ [private]
 

Reactor created by this factory.

Definition at line 55 of file QtResource_Factory.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 12:26:44 2006 for TAO by doxygen 1.3.6