diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2015-05-28 17:03:30 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2015-05-28 17:03:30 -0400 |
commit | df8da8c013dfa7fc1c51b483208001cdd97269ba (patch) | |
tree | bc3486d61b48e650cbc0bca317cfda5dff9993a4 | |
parent | 6a82ff08d9d47f70e3a5a8021f964dd91a55a7da (diff) |
MAINT-5232: Stop documenting deprecated alternative LLSingleton usage.
-rwxr-xr-x | indra/llcommon/llsingleton.h | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index a4877eed1f..5d2a26cae5 100755 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -30,30 +30,20 @@ #include <typeinfo> #include <boost/noncopyable.hpp> -// LLSingleton implements the getInstance() method part of the Singleton -// pattern. It can't make the derived class constructors protected, though, so -// you have to do that yourself. -// -// There are two ways to use LLSingleton. The first way is to inherit from it -// while using the typename that you'd like to be static as the template -// parameter, like so: -// -// class Foo: public LLSingleton<Foo>{}; -// -// Foo& instance = Foo::instance(); -// -// The second way is to use the singleton class directly, without inheritance: -// -// typedef LLSingleton<Foo> FooSingleton; -// -// Foo& instance = FooSingleton::instance(); -// -// In this case, the class being managed as a singleton needs to provide an -// initSingleton() method since the LLSingleton virtual method won't be -// available -// -// As currently written, it is not thread-safe. - +/** + * LLSingleton implements the getInstance() method part of the Singleton + * pattern. It can't make the derived class constructors protected, though, so + * you have to do that yourself. + * + * Derive your class from LLSingleton, passing your subclass name as + * LLSingleton's template parameter, like so: + * + * class Foo: public LLSingleton<Foo>{}; + * + * Foo& instance = Foo::instance(); + * + * As currently written, LLSingleton is not thread-safe. + */ template <typename DERIVED_TYPE> class LLSingleton : private boost::noncopyable { |