Packets: Fix VariantParser invalid parser access bug
[senf.git] / Utils / singleton.hh
index 831e812..b7b2814 100644 (file)
@@ -23,8 +23,8 @@
 /** \file
     \brief singleton public header */
 
-#ifndef HH_singleton_
-#define HH_singleton_ 1
+#ifndef HH_SENF_Utils_singleton_
+#define HH_SENF_Utils_singleton_ 1
 
 // Custom includes
 #include <boost/utility.hpp>
@@ -88,7 +88,11 @@ namespace senf {
         : boost::noncopyable
     {
     protected:
+        singleton();
+        ~singleton();
+
         static Self & instance();       ///< Return singleton instance
+        static bool alive();            ///< Return \c true, if instance ok, \c false otherwise
 
     private:
         /** \brief Internal
@@ -101,6 +105,7 @@ namespace senf {
         };
 
         static force_creation creator_;
+        static bool alive_;
     };
 
 }