UDK 3.2.7 C/C++ API Reference
|
Helper base class for a late-initialized (default-constructed) static variable, implementing the double-checked locking pattern correctly. More...
#include <instance.hxx>
Classes | |
struct | StaticInstanceWithArg |
Static Public Member Functions | |
static T & | get (const Data &rData) |
Gets the static. | |
static T & | get (Data &rData) |
Gets the static. |
Helper base class for a late-initialized (default-constructed) static variable, implementing the double-checked locking pattern correctly.
Derive from this class (common practice), e.g.
struct MyStatic : public rtl::Static<MyType, MyStatic> {}; ... MyType & rStatic = MyStatic::get(); ...
T | variable's type |
Unique | Implementation trick to make the inner static holder unique, using the outer class (the one that derives from this base class) |
static T& rtl::StaticWithArg< T, Data, Unique >::get | ( | const Data & | rData | ) | [inline, static] |
Gets the static.
Mutual exclusion is performed using the osl global mutex.
static T& rtl::StaticWithArg< T, Data, Unique >::get | ( | Data & | rData | ) | [inline, static] |
Gets the static.
Mutual exclusion is performed using the osl global mutex.