ANN: Boost review of Singleton library

  • Thread starter Pavel Vozenilek
  • Start date
P

Pavel Vozenilek

Boost (http://www.boost.org/) is collection of peer-reviewed C++ libraries.
Review of Singleton, written by Jason Hise, started just now.

The library is available at
http://boost-sandbox.sourceforge.net/vault/index.php?&direction=0&order=&directory=Singleton

The singleton documentation can be browsed online at
http://www.ezequal.com/chaos/docs/html/singleton/


Singleton is feature rich library:

- ensuring single instance of a class
and global access point to this instance

- with policies specifying:

- when the instance gets created
(manually, immediatelly, when first used, ...)

- how is the instance created
(by new, malloc, in static memory, ...)

- when the instance gets destroyed
(never, by priority, after another singleton, ...)



Parametrized singleton called Multiton is provided

City::pointer p1("Chicago");
City::pointer p2("Brussels");

will create two different "singletons" of the same type.


Another feature is ability to register resources
(like shared pointer) who will get destroyed
in controlled order, when the application exits.


If you have opinion on this library, found bug or
something missing, please reply here,
on Boost mail-list or privately.
All feedback is welcomed.

/Pavel
 
S

SirMike

Pavel said:
Boost (http://www.boost.org/) is collection of peer-reviewed C++ libraries.
Review of Singleton, written by Jason Hise, started just now.
Cool stuff. I see now that is not necessary to write my own singleton
class. I've written one lately but it was simplified. Now don't need to
improve it :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top