summaryrefslogtreecommitdiff
path: root/TAO/tao/TAO_Singleton.h
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-12-15 20:06:51 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-12-15 20:06:51 +0000
commit2f33b02d0037bc8ee6788c2840c7822922c0c952 (patch)
treedd9680e93d92ed55dcab63954c75283209681cb8 /TAO/tao/TAO_Singleton.h
parentbb98ac0816b9558d489efbdf87833dbbbbb75b80 (diff)
downloadATCD-2f33b02d0037bc8ee6788c2840c7822922c0c952.tar.gz
ChangeLogTag:Fri Dec 15 11:36:08 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/tao/TAO_Singleton.h')
-rw-r--r--TAO/tao/TAO_Singleton.h106
1 files changed, 53 insertions, 53 deletions
diff --git a/TAO/tao/TAO_Singleton.h b/TAO/tao/TAO_Singleton.h
index f6dc4d6c024..1bfc9091c7b 100644
--- a/TAO/tao/TAO_Singleton.h
+++ b/TAO/tao/TAO_Singleton.h
@@ -1,23 +1,19 @@
// -*- C++ -*-
-//
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO
-//
-// = FILENAME
-// TAO_Singleton.h
-//
-// = DESCRIPTION
-// Header file for the TAO-specific Singleton implementation.
-// Based entirely on tao/TAO_Singleton.*.
-//
-// = AUTHOR
-// Ossama Othman <ossama@uci.edu>
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file TAO_Singleton.h
+ *
+ * $Id$
+ *
+ * Header file for the TAO-specific Singleton implementation.
+ * Based entirely on tao/TAO_Singleton.*.
+ *
+ *
+ * @author Ossama Othman <ossama@uci.edu>
+ */
+//=============================================================================
+
#ifndef TAO_SINGLETON_H
#define TAO_SINGLETON_H
@@ -31,84 +27,88 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
+/**
+ * @class TAO_Singleton
+ *
+ * @brief TAO-specific Singleton class
+ *
+ * TAO_Singletons are used by TAO to register TAO-specific
+ * singleton instances with the TAO_Object_Manager. This
+ * ensures that TAO singletons are isolated from ACE's
+ * Object_Manager, thus allowing TAO to be safely dynamically
+ * unloaded.
+ */
template <class TYPE, class ACE_LOCK>
class TAO_Singleton : public ACE_Cleanup
{
- // = TITLE
- // TAO-specific Singleton class
- //
- // = DESCRIPTION
- // TAO_Singletons are used by TAO to register TAO-specific
- // singleton instances with the TAO_Object_Manager. This
- // ensures that TAO singletons are isolated from ACE's
- // Object_Manager, thus allowing TAO to be safely dynamically
- // unloaded.
public:
+ /// Global access point to the Singleton.
static TYPE *instance (void);
- // Global access point to the Singleton.
+ /// Cleanup method, used by <ace_cleanup_destroyer> to destroy the
+ /// singleton.
virtual void cleanup (void *param = 0);
- // Cleanup method, used by <ace_cleanup_destroyer> to destroy the
- // singleton.
+ /// Dump the state of the object.
static void dump (void);
- // Dump the state of the object.
protected:
+ /// Default constructor.
TAO_Singleton (void);
- // Default constructor.
+ /// Contained instance.
TYPE instance_;
- // Contained instance.
#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
+ /// Pointer to the Singleton (ACE_Cleanup) instance.
static TAO_Singleton<TYPE, ACE_LOCK> *singleton_;
- // Pointer to the Singleton (ACE_Cleanup) instance.
#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
+ /// Get pointer to the TAO Singleton instance.
static TAO_Singleton<TYPE, ACE_LOCK> *&instance_i (void);
- // Get pointer to the TAO Singleton instance.
};
+/**
+ * @class TAO_TSS_Singleton
+ *
+ * @brief TAO-specific Singleton class
+ *
+ * TAO_Singletons are used by TAO to register TAO-specific
+ * singleton instances with the TAO_Object_Manager. This
+ * ensures that TAO singletons are isolated from ACE's
+ * Object_Manager, thus allowing TAO to be safely dynamically
+ * unloaded.
+ */
template <class TYPE, class ACE_LOCK>
class TAO_TSS_Singleton : public ACE_Cleanup
{
- // = TITLE
- // TAO-specific Singleton class
- //
- // = DESCRIPTION
- // TAO_Singletons are used by TAO to register TAO-specific
- // singleton instances with the TAO_Object_Manager. This
- // ensures that TAO singletons are isolated from ACE's
- // Object_Manager, thus allowing TAO to be safely dynamically
- // unloaded.
public:
+ /// Global access point to the Singleton.
static TYPE *instance (void);
- // Global access point to the Singleton.
+ /// Cleanup method, used by <ace_cleanup_destroyer> to destroy the
+ /// singleton.
virtual void cleanup (void *param = 0);
- // Cleanup method, used by <ace_cleanup_destroyer> to destroy the
- // singleton.
+ /// Dump the state of the object.
static void dump (void);
- // Dump the state of the object.
protected:
+ /// Default constructor.
TAO_TSS_Singleton (void);
- // Default constructor.
+ /// Contained instance.
ACE_TSS_TYPE (TYPE) instance_;
- // Contained instance.
#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
+ /// Pointer to the Singleton (ACE_Cleanup) instance.
static TAO_TSS_Singleton<TYPE, ACE_LOCK> *singleton_;
- // Pointer to the Singleton (ACE_Cleanup) instance.
#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
+ /// Get pointer to the TAO TSS Singleton instance.
static TAO_TSS_Singleton<TYPE, ACE_LOCK> *&instance_i (void);
- // Get pointer to the TAO TSS Singleton instance.
};
#if defined (__ACE_INLINE__)