usata-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Usata-commits] Changes to usata2/src/object-registry.hpp


From: David Lau
Subject: [Usata-commits] Changes to usata2/src/object-registry.hpp
Date: Sun, 09 Jan 2005 03:51:53 -0500

Index: usata2/src/object-registry.hpp
diff -u usata2/src/object-registry.hpp:1.2 usata2/src/object-registry.hpp:1.3
--- usata2/src/object-registry.hpp:1.2  Thu Dec 30 16:41:18 2004
+++ usata2/src/object-registry.hpp      Sun Jan  9 08:17:14 2005
@@ -10,7 +10,7 @@
 // included in the software distribution, or visit
 // http://www.fsf.org/licenses/gpl.html.
 //
-// $Id: object-registry.hpp,v 1.2 2004/12/30 16:41:18 skunix Exp $
+// $Id: object-registry.hpp,v 1.3 2005/01/09 08:17:14 skunix Exp $
 
 
 #ifndef USATA_OBJECT_REGISTRY
@@ -33,15 +33,24 @@
  **/
 class ObjectRegistry
 {
-       static std::auto_ptr<ObjectRegistry> mInstance;
-
-       std::auto_ptr<ObjectRegistryImpl> mImpl;
+//     static std::auto_ptr<ObjectRegistry> mInstance;
+       static ObjectRegistry*  Instance;
+       std::auto_ptr<ObjectRegistryImpl> mImpl;        
        ObjectRegistry();
-               
+       ~ObjectRegistry() throw();              
        public:
+               struct StaticKilla
+               {
+                       ~StaticKilla()
+                       {ObjectRegistry::die();}
+               };
+       
+               friend class StaticKilla;
+
                /** \brief get a pointer to the ObjectRegistry
                    \todo define characteristics, and exception specs better
                  */
+               static void die();      
                static ObjectRegistry* instance();
                
                /**
@@ -57,7 +66,9 @@
                        \endcode
                **/
                
-               void add(const char* object_name, BIOCF create_func) throw();   
        
+               void add(const char* object_name, BIOCF create_func) throw();
+               
+               Object* create(const std::string& name); 
                        
 };
 /** 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]