QuantLib_Singleton (3) Linux Manual Page
QuantLib::Singleton – Basic support for the singleton pattern.
Synopsis
#include <ql/patterns/singleton.hpp>Inherits boost::noncopyable.
Static Public Member Functions
static T & instance ()access to the unique instance
Detailed Description
template<class T> class QuantLib::Singleton< T >
Basic support for the singleton pattern.The typical use of this class is:
class Foo : public Singleton<Foo> {
friend class Singleton<Foo>;
private:
Foo() {}
public:
…
}; 