Boost logo

Boost Users :

From: sixfurdk (sixfur_at_[hidden])
Date: 2002-02-08 09:51:24


I currently working on a Singleton<> template, which currently has
these features.

1) Supports the same interface/concepts as auto_ptr<>
2) One Line option to create a working singleton
3) Possible to use different Singletons of same type using names
(simultaneously)
4) Possible to store different Singleton Objects under the same name
(not simultaneously)
5) Possible to Release By Reference (Optional, Not Default)
6) Automatic Cleanup at program termination (Optional, Default)

It can be used in the following manner:

  class SingletonObject {
    void someFunction();
    ...
  };
  Singleton<SingletonObject> singleton;

  singleton->someFunction();

Is there any interrest in such a class?

Peter Sixhøj


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net