#include <singleton.h>
Inherited by Wt::Application, Wt::Audio, Wt::SDLDisplay, Wt::SDLEvent, and Wt::SDLInput.
Static Public Member Functions | |
static DERIVED * | instance () |
static DERIVED * | existingInstance () |
template<class GRANDCHILD> | |
static DERIVED * | instance () |
instantiates the pointer compatible child of DERIVED aka grandchild | |
static void | init () |
static void | quit () |
Protected Member Functions | |
Singleton (DERIVED *d) | |
Derived class public constructor. | |
~Singleton () | |
Static Protected Member Functions | |
static DERIVED * | load () |
try to load the instance | |
Static Protected Attributes | |
static DERIVED * | instance_ = 0 |
Classes | |
class | Exception |
Wt::Singleton< DERIVED >::Singleton | ( | DERIVED * | d | ) | [inline, protected] |
Derived class public constructor.
if the constructor of the derived class is public we have to call this constructor to properly set the instance
Wt::Singleton< DERIVED >::~Singleton | ( | ) | [inline, protected] |
static DERIVED* Wt::Singleton< DERIVED >::existingInstance | ( | ) | [inline, static] |
static void Wt::Singleton< DERIVED >::init | ( | ) | [inline, static] |
static DERIVED* Wt::Singleton< DERIVED >::instance | ( | ) | [inline, static] |
instantiates the pointer compatible child of DERIVED aka grandchild
it is handy in driver like situations
static DERIVED* Wt::Singleton< DERIVED >::instance | ( | ) | [inline, static] |
static DERIVED* Wt::Singleton< DERIVED >::load | ( | ) | [inline, static, protected] |
try to load the instance
if it fails return NULL if it succeeds must return the newly created object
Reimplemented in Wt::Audio, Wt::NullAudio, and Wt::SDLMixer.
static void Wt::Singleton< DERIVED >::quit | ( | ) | [inline, static] |
Reimplemented in Wt::Application.
DERIVED * Wt::Singleton< DERIVED >::instance_ = 0 [static, protected] |
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.