|
CoreLinux++
0.4.32
|
Ensure a class only has one instance, and provide a global point of access to it. More...
#include <Singleton.hpp>
Public Member Functions | |
| Singleton (void) throw ( Assertion ) | |
| Default constructor sets theSingleton and theType after insuring that they are not already instantiated. More... | |
| Singleton (TypeImpl *aTypePtr) throw ( Assertion ) | |
| Initializing constructor. | |
| virtual | ~Singleton (void) |
| Virtual destructor. | |
| bool | operator== (const Singleton &aSingleton) const |
| Equality operator tests that theSingleton instances are equal. More... | |
Public Member Functions inherited from corelinux::CoreLinuxObject | |
| CoreLinuxObject (void) | |
| Default Constructor. | |
| CoreLinuxObject (CoreLinuxObjectCref) | |
| Copy Constructor. More... | |
| virtual | ~CoreLinuxObject (void) |
| Virtual Destructor. | |
| CoreLinuxObjectRef | operator= (CoreLinuxObjectCref) |
| Assignment operator overload. More... | |
| bool | operator== (CoreLinuxObjectCref) const |
| Equality operator overload. More... | |
| bool | operator!= (CoreLinuxObjectCref) const |
| Non-equality operator overload. More... | |
Static Public Member Functions | |
| static TypeImpl * | instance (void) |
| Returns the instance of the TypeImpl. More... | |
Ensure a class only has one instance, and provide a global point of access to it.
This is easier said than done outside of the solution domain. While we can declare a protocol by which the use of this type will prevent multiple applications, we can't insure that the implementor won't violate said protocol.
|
inline | ||||||||||||||
Default constructor sets theSingleton and theType after insuring that they are not already instantiated.
| Assertion |
Referenced by corelinux::Singleton< TypeImpl >::instance().
|
inlinestatic |
Returns the instance of the TypeImpl.
References corelinux::CoreLinuxObject::CoreLinuxObject(), and corelinux::Singleton< TypeImpl >::Singleton().
Referenced by corelinux::Memory::createStorage(), corelinux::Thread::destroyThreadContext(), corelinux::Thread::dump(), corelinux::Thread::getActiveThreadCount(), corelinux::Thread::getBlockedThreadCount(), corelinux::Thread::getCompletedThreadCount(), corelinux::Thread::getThreadContext(), corelinux::CoreLinuxGuardPool::isLocked(), corelinux::CoreLinuxGuardPool::lock(), corelinux::Memory::Memory(), corelinux::CoreLinuxGuardPool::release(), corelinux::Thread::startThread(), and corelinux::Thread::Thread().
|
inline |
Equality operator tests that theSingleton instances are equal.
| Singleton | const reference |