![]() |
smgl 0.11.0
Structured Metadata Engine and Graph Objects Library
|
Lifetime policy which reconstructs a destroyed singleton if reaccessed. More...
#include <smgl/Singleton.hpp>
Static Public Member Functions | |
| static void | ScheduleDestruction (AtExitFunc destructionFn) |
| static void | OnDeadReference () |
Static Private Attributes | |
| static bool | destroyed_ = false |
Lifetime policy which reconstructs a destroyed singleton if reaccessed.
Note that this constructs a new object and does not restore the previous state of the singleton.
Definition at line 65 of file Singleton.hpp.
|
inlinestatic |
Sets destroyed state to true
Definition at line 77 of file Singleton.hpp.
|
inlinestatic |
Schedule destruction using std::atexit if not destroyed already
Definition at line 69 of file Singleton.hpp.
|
staticprivate |
Whether singleton has been destroyed
Definition at line 81 of file Singleton.hpp.