This is a discussion on ANN: Boost review of Singleton library (C++) within the Software Patterns forums, part of the Testing category; Boost ( http://www.boost.org/ ) is collection of peer-reviewed C++ libraries. Review of Singleton, written by Jason Hise, started ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
ANN: Boost review of Singleton library (C++)
Boost (http://www.boost.org/) is collection of peer-reviewed C++ libraries.
Review of Singleton, written by Jason Hise, started just now. As singleton is one of well known (and often disputed) patterns in OOP, state-of-the-art implementation in C++ may be of interest here. The library is available at http://boost-sandbox.sourceforge.net...tory=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: ointer p1("Chicago");City: ointer 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 |