Rechercher une page de manuel
QuantLib_Singleton
Langue: en
Version: 383932 (fedora - 01/12/10)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
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: ... };
which, albeit sub-optimal, frees one from the concerns of creating and managing the unique instance and can serve later as a single implemementation point should synchronization features be added.
Author
Generated automatically by Doxygen for QuantLib from the source code.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre