X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2Fsingleton.hh;h=b7b2814ac8fd485149bf3371928532caa4f34d12;hb=bd9f9d3fd6fbcff0112a7bf48ab9284da9576b11;hp=831e8125d108a5d02d6c8cbb376ee91217252eb8;hpb=a1a6c76a214ad1935032826713cabaf9ac57bf07;p=senf.git diff --git a/Utils/singleton.hh b/Utils/singleton.hh index 831e812..b7b2814 100644 --- a/Utils/singleton.hh +++ b/Utils/singleton.hh @@ -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 @@ -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_; }; }