GlobalObjects
|
Class to access the opened databases. More...
#include <GloOpenedDatabases.h>
Public Member Functions | |
Base * | getDataBase (unsigned long ulDatabaseID) |
Static Public Member Functions | |
static void | create (OpenedDatabases *&prInstance) |
static int | destroy () |
Protected Member Functions | |
OpenedDatabases () | |
virtual | ~OpenedDatabases () |
int | insertDataBase (const Base *pDatabase) |
int | removeDataBase (unsigned long ulDatabaseID) |
Static Protected Attributes | |
static int | ms_iReferenceCounter |
static OpenedDatabases * | ms_pInstance |
Private Member Functions | |
OpenedDatabases (const OpenedDatabases &) | |
OpenedDatabases & | operator= (const OpenedDatabases &) |
Private Attributes | |
std::unordered_map< unsigned long, Base * > | m_BaseContainer |
eut::CriticalSection | m_CallBackListCriticalSection |
Friends | |
class | Base |
Class to access the opened databases.
Here all databases log in when opened and log out again automatically when closed.
There can only be one object of this class (Singleton class).
|
protected |
The standard constructor is not available. You can get an instance via OpenedDatabases::create(OpenedDatabases*&) .
|
protectedvirtual |
The destructor is not available. An DebugClassSpy object may only be removed from memory with OpenedDatabases::destroy().
|
private |
The copy constructor is not available.
|
static |
Instantiation function. Since OpenedDatabases is a singleton class, this method instantiates it once and then only returns the pointer to the instance.
[in,out] | prInstance | The only instance of this class. |
|
static |
If the calling instance is the last one with a reference to the only instance of OpenedDatabases, this instance is removed from memory.
Base * glo::OpenedDatabases::getDataBase | ( | unsigned long | ulDatabaseID | ) |
Returns a database object from the list of database objects with respect to the database ID.
|
protected |
Inserts a database object into the list of database objects.
[in] | pDatabase | The database object to be inserted. |
|
private |
The assignment operator is not available.
|
protected |
Removes a database object from the list of database objects.
[in] | ulDatabaseID | The database ID of the database object to be removed. |
|
friend |
|
private |
The container of database objects. The index is the Base-ID.
|
private |
To have thread-safe access to the list of database objects, access is synchronized via this local CriticalSection.
|
staticprotected |
The reference counter to the only instance of this class.
|
staticprotected |
The only instance of this class.