Utils/Exception: Allow to disable ErrnoExceptions via SENF_NO_ERRNOEXC
[senf.git] / Utils / singleton.cti
index 02c07dc..51a8c89 100644 (file)
@@ -1,3 +1,5 @@
+// $Id$
+//
 // Copyright (C) 2007 
 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
@@ -32,14 +34,16 @@ template <class Self>
 prefix_ Self & senf::singleton<Self>::instance()
 {
     static Self instance_;
-    creator_.nop(); // Force instantiation of force_creation
+    // Force instantiation of force_creation (at static object creation time)
+    creator_.nop(); 
     return instance_;
 }
 
 template <class Self>
 prefix_ senf::singleton<Self>::force_creation::force_creation()
 {
-    senf::singleton<Self>::instance(); // Force execution of instance() thereby creating instance
+    // Force execution of instance() thereby creating instance
+    senf::singleton<Self>::instance();
 }
 
 template <class Self>
@@ -50,7 +54,7 @@ prefix_ void senf::singleton<Self>::force_creation::nop()
 }
 
 template <class Self>
-typename senf::singleton<Self>::force_creation senf::singleton<Self>::create_;
+typename senf::singleton<Self>::force_creation senf::singleton<Self>::creator_;
 
 ///////////////////////////////cti.e///////////////////////////////////////
 #undef prefix_
@@ -62,4 +66,6 @@ typename senf::singleton<Self>::force_creation senf::singleton<Self>::create_;
 // c-file-style: "senf"
 // indent-tabs-mode: nil
 // ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
 // End: