summaryrefslogtreecommitdiff
path: root/TAO/tao/GUIResource_Factory.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/GUIResource_Factory.h')
-rw-r--r--TAO/tao/GUIResource_Factory.h39
1 files changed, 26 insertions, 13 deletions
diff --git a/TAO/tao/GUIResource_Factory.h b/TAO/tao/GUIResource_Factory.h
index 192d4873d08..e10a3770497 100644
--- a/TAO/tao/GUIResource_Factory.h
+++ b/TAO/tao/GUIResource_Factory.h
@@ -6,15 +6,17 @@
*
* $Id$
*
- * @author Hamish Friedlander <ullexco@wave.co.nz>
* @author Balachandran Natarajan <bala@cs.wustl.edu>
+ * @author Marek Brudka <mbrudka@aster.pl>
*/
//=============================================================================
#ifndef TAO_GUI_RESOURCE_FACTORY_H
#define TAO_GUI_RESOURCE_FACTORY_H
#include /**/ "ace/pre.h"
-#include /**/ "TAO_Export.h"
+#include "ace/Thread_Mutex.h"
+#include "tao/TAO_Export.h"
+#include "tao/orbconf.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
@@ -26,24 +28,23 @@ class ACE_Reactor;
namespace TAO
{
- /** Abstract base class for the GUI resource factory, which will be held in TSS by the ORB Core.
+ /** Abstract base class for the GUI resource factory.
*
- * This base class for resource factories which provide GUIReactors integrated with specific GUI
- * event loop. In general, children of this class reimplement reactor_impl method where specific
- * GUIReactor is created. GUIResource_Factory are usually created by GUIResource_Loader
- * subclasses.
+ * This base class for resource factories which provide
+ * GUIReactors integrated with specific GUI
+ * event loop. In general, children of this class reimplement
+ * reactor_impl method where specific
+ * GUIReactor is created. GUIResource_Factory are usually
+ * created by GUIResource_Loader subclasses.
+ * Children of this class will be held in TSS by the ORB Core.
*/
class TAO_Export GUIResource_Factory
{
public:
+
GUIResource_Factory ();
- virtual ~GUIResource_Factory ();
- /** Create or return current reactor instance.
- * Please note that this call is NOT synchronized. Left to the
- * higher level versions to synchronize access.
- */
- virtual ACE_Reactor_Impl *reactor_impl (void) = 0;
+ virtual ~GUIResource_Factory ();
/** Create ACE_Reactor using allocate_reactor_impl.
* Please note that this call is NOT synchronized. Left to the
@@ -57,7 +58,16 @@ namespace TAO
*/
virtual void reclaim_reactor (ACE_Reactor *);
+ protected:
+
+ /** Create or return current reactor instance.
+ * Please note that this call is NOT synchronized. Left to the
+ * get_reactor to synchronize access.
+ */
+ virtual ACE_Reactor_Impl *reactor_impl (void) = 0;
+
private:
+
/**
* Flag that is set to 1 if the reactor obtained from the
* get_reactor() method is dynamically allocated. If this flag is
@@ -70,6 +80,9 @@ namespace TAO
* override the reclaim_reactor() method.
*/
int dynamically_allocated_reactor_;
+
+ /// for internal locking.
+ TAO_SYNCH_MUTEX lock_;
};
}