Util--  1.1
wrapper.hh
Go to the documentation of this file.
1 /* -*- C++ -*-
2  * $Id: wrapper.hh 971 2005-04-08 16:31:47Z sjoyeux $
3  */
4 #ifndef UTILMM_SINGLETON_WRAPPER_HEADER
5 # define UTILMM_SINGLETON_WRAPPER_HEADER
6 
8 
9 namespace utilmm {
10  namespace singleton {
11  namespace details {
12  template<typename Ty>
14  }
15 
30  template<typename Ty>
31  class wrapper :private dummy {
32  public:
40  static void attach();
50  static void detach();
51 
58  static Ty &instance();
59 
60  private:
61  wrapper();
62  ~wrapper();
63 
64  static std::string name();
65 
66  Ty value;
67 
68  friend class details::wrapper_factory<Ty>;
69  }; // class utilmm::singleton::wrapper<>
70 
71  } // namespace utilmm::singleton
72 } // namespace utilmm
73 
74 # define IN_UTILMM_SINGLETON_WRAPPER_HEADER
75 #include "utilmm/singleton/bits/wrapper.tcc"
76 # undef IN_UTILMM_SINGLETON_WRAPPER_HEADER
77 #endif // UTILMM_SINGLETON_WRAPPER_HEADER
78 
Wrapper for singleton instances.
Definition: wrapper.hh:31
Definition: auto_flag.hh:6
base class for utilmm::singleton::wrapper
Definition: dummy.hh:32
Declaration of utilmm::singleton::dummy.

Generated on Wed Oct 17 2018 09:34:19 for Util-- by doxygen 1.8.13
SourceForge.net Project Page