From 64a8b101a6c5d47987892a0129c148a38fca17be Mon Sep 17 00:00:00 2001 From: mbrudka Date: Sun, 23 Jan 2005 01:30:32 +0000 Subject: ChangeLogTag: Sun Jan 23 01:54:59 2005 Marek Brudka --- TAO/tao/XtResource_Factory.h | 61 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 TAO/tao/XtResource_Factory.h (limited to 'TAO/tao/XtResource_Factory.h') diff --git a/TAO/tao/XtResource_Factory.h b/TAO/tao/XtResource_Factory.h new file mode 100644 index 00000000000..5498865a256 --- /dev/null +++ b/TAO/tao/XtResource_Factory.h @@ -0,0 +1,61 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file XtResource_Factory.h + * + * $Id$ + * + * @author Balachandran Natarajan + * @author Marek Brudka + */ +//============================================================================= +#ifndef TAO_XTRESOURCE_FACTORY_H +#define TAO_XTRESOURCE_FACTORY_H +#include /**/ "ace/pre.h" +#include /**/ +#include "tao/TAO_XtResource_Export.h" +#include "ace/XtReactor.h" +#include "tao/GUIResource_Factory.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +namespace TAO +{ + + /** + * @class XtResource_Factory + * + * @brief TAO_GUI_Resource_Factory for creating XtReactor. + * + * This factory is intended for creating XtReactor for ORB. This + * factory can be feed into ORB using + * TAO_ORB_Core::set_gui_resource_factory method which is usually + * done by TAO_XtResource_Loader. + */ + + class TAO_XtResource_Export XtResource_Factory : public GUIResource_Factory + { + public: + XtResource_Factory (XtAppContext context); + + /// Create or obtain current reactor implementation + virtual ACE_Reactor_Impl *reactor_impl (void); + + private: + + /// Reactor created by this factory. + ACE_XtReactor *reactor_impl_; + + /// Xt context for XtReactor + XtAppContext context_; + + /// for internal locking + TAO_SYNCH_MUTEX lock_; + }; +} + +#include /**/ "ace/post.h" +#endif /* TAO_XTRESOURCE_FACTORY_H */ -- cgit v1.2.1