GlobalObjects
Loading...
Searching...
No Matches
GloPersObjectSpy.h
Go to the documentation of this file.
1#ifndef INC_GLOPERSOBJECTSPY_H
2#define INC_GLOPERSOBJECTSPY_H
3//-----------------------------------------------------------------------------
36//-----------------------------------------------------------------------------
37#include "GloTypes.h"
38#include <unordered_map>
39#include <memory>
40#if defined (__PTHREADS)
41 #include <EuPCriticalSection.h>
42#else
43 #include "EuCriticalSection.h"
44#endif
45//-----------------------------------------------------------------------------
46namespace glo
47{
48 //---------------------------------------------------------------------------
49 /* Forwards */
50 class Persistent;
51 //---------------------------------------------------------------------------
52 #ifdef _MSC_VER
53 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
54 #pragma warning( disable : 4251 )
55 #endif
56 //---------------------------------------------------------------------------
75 {
76 private:
77 //============== Friends
78 //-----------------------------------------------------------------------
79 friend class Persistent;
80 friend class ObjectMaker;
81 //-----------------------------------------------------------------------
82
83 //============== Attribute
84 //-----------------------------------------------------------------------
96 #if defined (__PTHREADS)
97 EuPCriticalSection m_LocalCriticalSection;
98 #else
100 #endif
101 //-----------------------------------------------------------------------
117 std::unordered_map< unsigned long, Persistent * > m_PersObjectList;
118 //-----------------------------------------------------------------------
128 std::unordered_map< unsigned long, Persistent * >::iterator m_PersObjectListIterator;
129 //-----------------------------------------------------------------------
130
131 public:
132 //============== Konstruktoren
133 //-----------------------------------------------------------------------
144 //-----------------------------------------------------------------------
154 virtual ~PersObjectSpy();
155 //-----------------------------------------------------------------------
156
157 private:
158 //============== Konstruktoren
159 //-----------------------------------------------------------------------
170 //-----------------------------------------------------------------------
171
172 public:
173 //============== Methoden
174 //-----------------------------------------------------------------------
186 std::size_t sizeOfPersObjectList() const;
187 //-----------------------------------------------------------------------
224 //-----------------------------------------------------------------------
271 int getPersistentObject( Persistent *& prRetVal, EnSeekMode eMode );
272 //-----------------------------------------------------------------------
310 int getPersistentObject( std::shared_ptr<Persistent> & rRetVal,
311 EnSeekMode eMode );
312 //-----------------------------------------------------------------------
334 Persistent * getPersistentObject( const ObjID & rGloObjID );
335 //-----------------------------------------------------------------------
369 const ObjID & rGloObjID );
370 //-----------------------------------------------------------------------
393 int getPersistentObject( std::shared_ptr<Persistent> & rRetVal,
394 const ObjID & rGloObjID );
395 //-----------------------------------------------------------------------
410 int insertPersistentObject( const Persistent * pPersObject );
411 //-----------------------------------------------------------------------
425 int removePersistentObject( const Persistent * pPersObject );
426 //-----------------------------------------------------------------------
427
428 private:
429 //============== Operatoren
430 //-----------------------------------------------------------------------
440 PersObjectSpy & operator= ( const PersObjectSpy & );
441 //-----------------------------------------------------------------------
442 };
443 //---------------------------------------------------------------------------
444 #ifdef _MSC_VER
445 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
446 #pragma warning( default : 4251 )
447 #endif
448 //---------------------------------------------------------------------------
449} // namespace glo
450#endif
Header for CriticalSection
Header for EuPCriticalSection
For each library, here 'GlobalObjects' there is a type file.
#define __glo_export_dll
Definition GloTypes.h:63
Is a mutex which can be queried via its lock mode. See isLocked().
Definition EuPCriticalSection.h:89
Is a mutex which can be queried via its lock mode. See isLocked().
Definition EuCriticalSection.h:94
An object ID consists of the class ID, a database ID and the actual unique object number (all unsigne...
Definition GloObjID.h:77
This class can instantiate a persistent object from a record or fill a persistent object and vice ver...
Definition GloObjectMaker.h:63
Class to access the persistent objects of a database in memory.
Definition GloPersObjectSpy.h:75
int getPersistentObject(Persistent *&prRetVal, const ObjID &rGloObjID)
int getPersistentObject(std::shared_ptr< Persistent > &rRetVal, EnSeekMode eMode)
int insertPersistentObject(const Persistent *pPersObject)
virtual ~PersObjectSpy()
Persistent * getPersistentObject(EnSeekMode eMode)
int getPersistentObject(std::shared_ptr< Persistent > &rRetVal, const ObjID &rGloObjID)
int getPersistentObject(Persistent *&prRetVal, EnSeekMode eMode)
std::unordered_map< unsignedlong, Persistent * >::iterator m_PersObjectListIterator
Definition GloPersObjectSpy.h:128
std::size_t sizeOfPersObjectList() const
PersObjectSpy(const PersObjectSpy &)
Persistent * getPersistentObject(const ObjID &rGloObjID)
eut::CriticalSection m_LocalCriticalSection
Definition GloPersObjectSpy.h:99
std::unordered_map< unsigned long, Persistent * > m_PersObjectList
Definition GloPersObjectSpy.h:117
int removePersistentObject(const Persistent *pPersObject)
The base class of the persistent classes. All persistent classes must be derived from this class to b...
Definition GloPersistent.h:221
Definition GloAbstractBaseLot.h:42
EnSeekMode
Definition GloTypes.h:166