25#include "utils/log.hpp"
42 Log::info(
"Singleton",
"Destroyed singleton.");
55 if (m_singleton == NULL)
58 S* result = (
dynamic_cast<S*
> (m_singleton));
60 Log::debug(
"Singleton",
"THE SINGLETON HAS NOT BEEN REALOCATED, IT IS NOT OF THE REQUESTED TYPE.");
80 static T *m_singleton;
94 Log::info(
"Singleton",
"Destroyed singleton.");
101 if (m_singleton == NULL)
117 static T *m_singleton;
Manages the abstract singleton at runtime. This has been designed to allow multi-inheritance....
Definition: singleton.hpp:35
virtual ~AbstractSingleton()
Destructor.
Definition: singleton.hpp:40
static void kill()
Used to kill the singleton, if needed.
Definition: singleton.hpp:70
AbstractSingleton()
Constructor.
Definition: singleton.hpp:38
static T * getInstance()
Used to get the instance.
Definition: singleton.hpp:64
static S * getInstance()
Used to get the instance, after a dynamic cast. This is important when making a double-inheritance of...
Definition: singleton.hpp:53
Definition: singleton.hpp:87
Singleton()
Constructor.
Definition: singleton.hpp:90
static void kill()
Used to kill the singleton, if needed.
Definition: singleton.hpp:107
virtual ~Singleton()
Destructor.
Definition: singleton.hpp:92
static T * getInstance()
Used to get the instance.
Definition: singleton.hpp:99