GlobalObjects
Loading...
Searching...
No Matches
GloOpenedDatabases.h
Go to the documentation of this file.
1#ifndef INC_GLOOPENEDDATABASES_H
2#define INC_GLOOPENEDDATABASES_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include "GloTypes.h"
45#include <unordered_map>
46#if defined (__PTHREADS)
47 #include <EuPCriticalSection.h>
48#else
49 #include "EuCriticalSection.h"
50#endif
51//-----------------------------------------------------------------------------
52namespace glo
53{
54 //-----------------------------------------------------------------------------
55 #ifdef _MSC_VER
56 /*'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
57 #pragma warning( disable : 4251 )
58 #endif
59 //---------------------------------------------------------------------------
60 /* Forwards */
61 //---------------------------------------------------------------------------
62 class Base;
63 //---------------------------------------------------------------------------
85 {
86 private:
87 //============== Friends
88 //-----------------------------------------------------------------------
89 friend class Base;
90 //-----------------------------------------------------------------------
91
92 //============== Attribute
93 //-----------------------------------------------------------------------
105 #if defined (__PTHREADS)
106 EuPCriticalSection m_CallBackListCriticalSection;
107 #else
109 #endif
110 //-----------------------------------------------------------------------
120 std::unordered_map< unsigned long, Base * > m_BaseContainer;
121 //-----------------------------------------------------------------------
122
123 protected:
124 //========== static Attribute =========
125 //-----------------------------------------------------------------------
136 //-----------------------------------------------------------------------
147 //-----------------------------------------------------------------------
148
149 //============== Konstruktoren
150 //-----------------------------------------------------------------------
163 //-----------------------------------------------------------------------
176 //-----------------------------------------------------------------------
177
178 private:
179 //============== Konstruktoren
180 //-----------------------------------------------------------------------
191 //-----------------------------------------------------------------------
192
193 public:
194 //========== static Methoden =========
195 //-----------------------------------------------------------------------
214 static void create( OpenedDatabases *& prInstance );
215 //-----------------------------------------------------------------------
229 static int destroy();
230 //-----------------------------------------------------------------------
231
232 public:
233 //============== Methoden
234 //-----------------------------------------------------------------------
254 Base * getDataBase( unsigned long ulDatabaseID );
255 //-----------------------------------------------------------------------
256
257 protected:
258 //============== Methoden
259 //-----------------------------------------------------------------------
272 int insertDataBase( const Base * pDatabase );
273 //-----------------------------------------------------------------------
286 int removeDataBase( unsigned long ulDatabaseID );
287 //-----------------------------------------------------------------------
288
289 private:
290 //============== Operatoren
291 //-----------------------------------------------------------------------
301 OpenedDatabases & operator= ( const OpenedDatabases & );
302 //-----------------------------------------------------------------------
303 };
304 //---------------------------------------------------------------------------
305 #ifdef _MSC_VER
306 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
307 #pragma warning( default : 4251 )
308 #endif
309 //---------------------------------------------------------------------------
310} // namespace glo
311#endif
Header for CriticalSection
Header for EuPCriticalSection
For each library, here 'GlobalObjects' there is a type file.
#define __glo_export_dll
Definition GloTypes.h:70
Is a mutex which can be queried via its lock mode. See isLocked().
Definition EuPCriticalSection.h:104
Is a mutex which can be queried via its lock mode. See isLocked().
Definition EuCriticalSection.h:109
Definition GloBase.h:263
Class to access the opened databases.
Definition GloOpenedDatabases.h:85
static void create(OpenedDatabases *&prInstance)
static int ms_iReferenceCounter
Definition GloOpenedDatabases.h:146
int removeDataBase(unsigned long ulDatabaseID)
int insertDataBase(const Base *pDatabase)
OpenedDatabases(const OpenedDatabases &)
static OpenedDatabases * ms_pInstance
Definition GloOpenedDatabases.h:135
std::unordered_map< unsigned long, Base * > m_BaseContainer
Definition GloOpenedDatabases.h:120
static int destroy()
eut::CriticalSection m_CallBackListCriticalSection
Definition GloOpenedDatabases.h:108
virtual ~OpenedDatabases()
Base * getDataBase(unsigned long ulDatabaseID)
Definition GloAbstractBaseLot.h:49