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//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include "GloTypes.h"
45#include <unordered_map>
46#include <memory>
47#if defined (__PTHREADS)
48 #include <EuPCriticalSection.h>
49#else
50 #include "EuCriticalSection.h"
51#endif
52//-----------------------------------------------------------------------------
53namespace glo
54{
55 //---------------------------------------------------------------------------
56 /* Forwards */
57 class Persistent;
58 //---------------------------------------------------------------------------
59 #ifdef _MSC_VER
60 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
61 #pragma warning( disable : 4251 )
62 #endif
63 //---------------------------------------------------------------------------
82 {
83 private:
84 //============== Friends
85 //-----------------------------------------------------------------------
86 friend class Persistent;
87 friend class ObjectMaker;
88 //-----------------------------------------------------------------------
89
90 //============== Attribute
91 //-----------------------------------------------------------------------
103 #if defined (__PTHREADS)
104 EuPCriticalSection m_LocalCriticalSection;
105 #else
107 #endif
108 //-----------------------------------------------------------------------
124 std::unordered_map< unsigned long, Persistent * > m_PersObjectList;
125 //-----------------------------------------------------------------------
135 std::unordered_map< unsigned long, Persistent * >::iterator m_PersObjectListIterator;
136 //-----------------------------------------------------------------------
137
138 public:
139 //============== Konstruktoren
140 //-----------------------------------------------------------------------
151 //-----------------------------------------------------------------------
161 virtual ~PersObjectSpy();
162 //-----------------------------------------------------------------------
163
164 private:
165 //============== Konstruktoren
166 //-----------------------------------------------------------------------
177 //-----------------------------------------------------------------------
178
179 public:
180 //============== Methoden
181 //-----------------------------------------------------------------------
193 std::size_t sizeOfPersObjectList() const;
194 //-----------------------------------------------------------------------
231 //-----------------------------------------------------------------------
278 int getPersistentObject( Persistent *& prRetVal, EnSeekMode eMode );
279 //-----------------------------------------------------------------------
317 int getPersistentObject( std::shared_ptr<Persistent> & rRetVal,
318 EnSeekMode eMode );
319 //-----------------------------------------------------------------------
341 Persistent * getPersistentObject( const ObjID & rGloObjID );
342 //-----------------------------------------------------------------------
376 const ObjID & rGloObjID );
377 //-----------------------------------------------------------------------
400 int getPersistentObject( std::shared_ptr<Persistent> & rRetVal,
401 const ObjID & rGloObjID );
402 //-----------------------------------------------------------------------
417 int insertPersistentObject( const Persistent * pPersObject );
418 //-----------------------------------------------------------------------
432 int removePersistentObject( const Persistent * pPersObject );
433 //-----------------------------------------------------------------------
434
435 private:
436 //============== Operatoren
437 //-----------------------------------------------------------------------
447 PersObjectSpy & operator= ( const PersObjectSpy & );
448 //-----------------------------------------------------------------------
449 };
450 //---------------------------------------------------------------------------
451 #ifdef _MSC_VER
452 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
453 #pragma warning( default : 4251 )
454 #endif
455 //---------------------------------------------------------------------------
456} // namespace glo
457#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
An object ID consists of the class ID, a database ID and the actual unique object number (all unsigne...
Definition GloObjID.h:84
This class can instantiate a persistent object from a record or fill a persistent object and vice ver...
Definition GloObjectMaker.h:70
Class to access the persistent objects of a database in memory.
Definition GloPersObjectSpy.h:82
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:135
std::size_t sizeOfPersObjectList() const
PersObjectSpy(const PersObjectSpy &)
Persistent * getPersistentObject(const ObjID &rGloObjID)
eut::CriticalSection m_LocalCriticalSection
Definition GloPersObjectSpy.h:106
std::unordered_map< unsigned long, Persistent * > m_PersObjectList
Definition GloPersObjectSpy.h:124
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:242
Definition GloAbstractBaseLot.h:49
EnSeekMode
Definition GloTypes.h:173