/[usata]/usata2/src/object-registry.hpp
ViewVC logotype

Diff of /usata2/src/object-registry.hpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by skunix, Thu Dec 30 16:41:18 2004 UTC revision 1.3 by skunix, Sun Jan 9 08:17:14 2005 UTC
# Line 33  struct ObjectRegistryImpl; Line 33  struct ObjectRegistryImpl;
33   **/   **/
34  class ObjectRegistry  class ObjectRegistry
35  {  {
36          static std::auto_ptr<ObjectRegistry> mInstance;  //      static std::auto_ptr<ObjectRegistry> mInstance;
37            static ObjectRegistry*  Instance;
38          std::auto_ptr<ObjectRegistryImpl> mImpl;          std::auto_ptr<ObjectRegistryImpl> mImpl;        
39          ObjectRegistry();          ObjectRegistry();
40                            ~ObjectRegistry() throw();              
41          public:          public:
42                    struct StaticKilla
43                    {
44                            ~StaticKilla()
45                            {ObjectRegistry::die();}
46                    };
47            
48                    friend class StaticKilla;
49    
50                  /** \brief get a pointer to the ObjectRegistry                  /** \brief get a pointer to the ObjectRegistry
51                      \todo define characteristics, and exception specs better                      \todo define characteristics, and exception specs better
52                    */                    */
53                    static void die();      
54                  static ObjectRegistry* instance();                  static ObjectRegistry* instance();
55                                    
56                  /**                  /**
# Line 57  class ObjectRegistry Line 66  class ObjectRegistry
66                          \endcode                          \endcode
67                  **/                  **/
68                                    
69                  void add(const char* object_name, BIOCF create_func) throw();                            void add(const char* object_name, BIOCF create_func) throw();
70                    
71                    Object* create(const std::string& name);
72                                                    
73  };  };
74  /**  /**

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26