GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloPersistent.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLOPERSISTENT_H
2#define INC_GLOPERSISTENT_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include "GloTypes.h"
45#include "GloBasePersistent.h"
46#include "GloPersObjectSpy.h"
47#include "GloAttributeID.h"
48#include "GloRecord.h"
49#include "GloTOndemand.h"
50#include "GloTPointerSet.h"
51#include "GloTOndemandSet.h"
52#include "GloTPointerList.h"
53#include "GloTOndemandList.h"
54#include "EuException.h"
55#include <string>
56#include <ctime>
57#include <list>
58//-----------------------------------------------------------------------------
59// Glo Macros
60//-----------------------------------------------------------------------------
82#define GLO_OBJECT(...) \
83 public: \
84 virtual unsigned long getGloClassID() const override; \
85 virtual int getTypeAsString( std::string & rsTypeName ) override; \
86 virtual int setGloAttribute( const glo::AttributeID & rAttributeID, void * pPara ) override; \
87 virtual void * getGloAttribute( const glo::AttributeID & rAttributeID ) override; \
88 virtual int setGloAttribute( const std::string & rstrAttributeName, void * pPara ) override; \
89 virtual void * getGloAttribute( const std::string & rstrAttributeName ) override; \
90 virtual bool isSameOrSuperClassFrom( const glo::Persistent * pPersistent ) const override; \
91 virtual bool isSameOrSuperClassFrom( const std::shared_ptr<glo::Persistent> spPersistent ) const override; \
92 virtual void _postAssign( glo::Base & rBase ) override; \
93 private:
94//-----------------------------------------------------------------------------
134#define GLO_INDEX(...)
135//-----------------------------------------------------------------------------
137#define GLO_ANNOTATE_ACCESS_SPECIFIER(x)
138//-----------------------------------------------------------------------------
144#define GLO_PERSISTENT_AREA GLO_ANNOTATE_ACCESS_SPECIFIER(x)
145//-----------------------------------------------------------------------------
166#define persistent GLO_PERSISTENT_AREA
167//-----------------------------------------------------------------------------
181#define transient GLO_PERSISTENT_AREA
182//-----------------------------------------------------------------------------
183
184//-----------------------------------------------------------------------------
185namespace glo
186{
242 {
243 //============== Attributes
244 //-----------------------------------------------------------------------
257 //-----------------------------------------------------------------------
268 std::time_t m_dtCreateDate;
269 //-----------------------------------------------------------------------
281 std::time_t m_dtLastChange;
282 //-----------------------------------------------------------------------
283
284 public:
285 //============== ctor
286 //-----------------------------------------------------------------------
297 //-----------------------------------------------------------------------
298
299 protected:
300 //============== detor
301 //-----------------------------------------------------------------------
317 virtual ~Persistent();
318 //-----------------------------------------------------------------------
319
320 public:
321 //============== copy ctor
322 //-----------------------------------------------------------------------
334 Persistent( const Persistent & rT );
335 //-----------------------------------------------------------------------
336
337 public:
338 //============== Methoden
339 //-----------------------------------------------------------------------
357 virtual void activate();
358 //-----------------------------------------------------------------------
386 virtual int assign( Base & rBase ) override;
387 //-----------------------------------------------------------------------
399 virtual void removeBase() override;
400 //-----------------------------------------------------------------------
410 virtual ObjID getObjID() const override;
411 //-----------------------------------------------------------------------
423 virtual std::time_t getCreateDate() const override;
424 //-----------------------------------------------------------------------
436 virtual std::time_t getLastChangeDate() const override;
437 //-----------------------------------------------------------------------
455 virtual void takeOverRecord( Record * pRecord ) override;
456 //-----------------------------------------------------------------------
490 virtual int preStore( EnDeepMode eDeepMode, void *& prData );
491 //-----------------------------------------------------------------------
526 virtual int store( EnDeepMode eDeepMode = DM_SHALLOW ) override;
527 //-----------------------------------------------------------------------
549 virtual void postStore( int iStoreErr, EnDeepMode eDeepMode, void * pData );
550 //-----------------------------------------------------------------------
586 virtual int preDeleteInBase( EnDeepMode eDeepMode, void *& prData );
587 //-----------------------------------------------------------------------
617 virtual int deleteInBase( EnDeepMode eDeepMode = DM_SHALLOW ) override;
618 //-----------------------------------------------------------------------
642 virtual void postDeleteInBase( int iDeleteErr, EnDeepMode eDeepMode, void * pData );
643 //-----------------------------------------------------------------------
676 virtual int preRefresh( void *& prData );
677 //-----------------------------------------------------------------------
708 virtual int refresh() override;
709 //-----------------------------------------------------------------------
731 virtual void postRefresh( int iRefreshErr, void * pData );
732 //-----------------------------------------------------------------------
771 virtual int preLock( EnLockMode eLockMode, EnDeepMode eDeepMode, void *& prData );
772 //-----------------------------------------------------------------------
810 virtual int lock( EnLockMode eLockMode = LK_DELETEvWRITE,
811 EnDeepMode eDeepMode = DM_SHALLOW ) override;
812 //-----------------------------------------------------------------------
838 virtual void postLock( int iLockErr, EnLockMode eLockMode, EnDeepMode eDeepMode, void * pData );
839 //-----------------------------------------------------------------------
878 virtual int preRelock( EnLockMode eLockMode, EnDeepMode eDeepMode, void *& prData );
879 //-----------------------------------------------------------------------
927 virtual int relock( EnLockMode eLockMode = LK_DELETEvWRITE,
928 EnDeepMode eDeepMode = DM_SHALLOW ) override;
929 //-----------------------------------------------------------------------
955 virtual void postRelock( int iLockErr, EnLockMode eLockMode, EnDeepMode eDeepMode, void * pData );
956 //-----------------------------------------------------------------------
995 virtual int preUnlock( EnLockMode eLockMode, EnDeepMode eDeepMode, void *& prData );
996 //-----------------------------------------------------------------------
1036 virtual int unlock( EnLockMode eLockMode = LK_DELETEvWRITE,
1037 EnDeepMode eDeepMode = DM_SHALLOW ) override;
1038 //-----------------------------------------------------------------------
1065 virtual void postUnlock( int iUnlockErr, EnLockMode eLockMode, EnDeepMode eDeepMode, void * pData );
1066 //-----------------------------------------------------------------------
1110 virtual int preSetWatch( TdWatchNotifyMode ulWatchMode,
1111 EnDeepMode eDeepMode,
1112 CallBack * pCallBack,
1113 void *& prData );
1114 //-----------------------------------------------------------------------
1186 virtual int setWatch( TdWatchNotifyMode ulWatchMode,
1187 EnDeepMode eDeepMode,
1188 CallBack * pCallBack = 0 ) override;
1189 //-----------------------------------------------------------------------
1223 virtual void postSetWatch( int iSetWatchErr,
1224 TdWatchNotifyMode ulWatchMode,
1225 EnDeepMode eDeepMode,
1226 CallBack * pCallBack,
1227 void * pData );
1228 //-----------------------------------------------------------------------
1272 virtual int preUnsetWatch( TdWatchNotifyMode ulWatchMode,
1273 EnDeepMode eDeepMode,
1274 CallBack * pCallBack,
1275 void *& prData );
1276 //-----------------------------------------------------------------------
1347 virtual int unsetWatch( TdWatchNotifyMode ulWatchMode,
1348 EnDeepMode eDeepMode,
1349 CallBack * pCallBack = 0 ) override;
1350 //-----------------------------------------------------------------------
1383 virtual void postUnsetWatch( int iUnsetWatchErr,
1384 TdWatchNotifyMode ulWatchMode,
1385 EnDeepMode eDeepMode,
1386 CallBack * pCallBack,
1387 void * pData );
1388 //-----------------------------------------------------------------------
1389
1390 protected:
1391 //============== Methoden
1392 //-----------------------------------------------------------------------
1402 virtual void insertInObjectSpy() const override;
1403 //-----------------------------------------------------------------------
1413 virtual void removeInObjectSpy() const override;
1414 //-----------------------------------------------------------------------
1424 virtual void setCreateDate() override;
1425 //-----------------------------------------------------------------------
1426
1427 public:
1428 //============== Methoden
1429 //-----------------------------------------------------------------------
1445 virtual unsigned long getGloClassID() const override;
1446 //-----------------------------------------------------------------------
1460 virtual int getTypeAsString( std::string & rsTypeName ) override;
1461 //-----------------------------------------------------------------------
1487 virtual int setGloAttribute( const AttributeID & rAttributeID, void * pPara );
1488 //-----------------------------------------------------------------------
1511 virtual void * getGloAttribute( const AttributeID & rAttributeID );
1512 //-----------------------------------------------------------------------
1538 virtual int setGloAttribute (const std::string & rstrAttributName, void * pPara);
1539 //-----------------------------------------------------------------------
1561 virtual void * getGloAttribute (const std::string & rstrAttributName);
1562 //-----------------------------------------------------------------------
1564
1579 virtual bool isSameOrSuperClassFrom( const glo::Persistent * pPersistent ) const;
1580 virtual bool isSameOrSuperClassFrom( const std::shared_ptr<glo::Persistent> pPersistent ) const;
1582 //-----------------------------------------------------------------------
1583
1584 protected:
1585 //============== Methoden
1586 //-----------------------------------------------------------------------
1607 virtual void _postAssign( Base & rBase );
1608 //-----------------------------------------------------------------------
1609
1610 //============== Operatoren
1611 //-----------------------------------------------------------------------
1623 Persistent & operator= ( const Persistent & rT );
1624 //-----------------------------------------------------------------------
1626
1637 bool operator== ( const Persistent & rT ) const;
1638 bool operator!= ( const Persistent & rT ) const;
1640 //-----------------------------------------------------------------------
1641 };
1642 //---------------------------------------------------------------------------
1643} // namespace glo
1644#endif
Header für ErrorNException
Header für AttributeID
Header für BasePersistent
Header für PersObjectSpy
Header für Record und Record::IndexStrNameTuple
Header und Source für TOndemand
Header und Source für TOndemandList
Header und Source für TOndemandSet
Header und Source für TPointerList
Header und Source für TPointerSet
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:70
Diese Klasse spiegelt eine eindeutige ID eines Klasseninformations-Attributes wieder.
Definition GloAttributeID.h:81
Definition GloBase.h:263
Abstrakte Basisklasse für Persistent und die generische GenericPersistent.
Definition GloBasePersistent.h:124
Oberklasse für die Klassen, welche mit einer Base 'verbunden' sind.
Definition GloCallBack.h:81
Ein Objekt-ID besteht aus der Klassen-ID, einer Datenbank-ID und der eigentlichen eindeutigen ObjektZ...
Definition GloObjID.h:84
Die Basisklasse der persistenten Klassen. Von dieser Klasse müssen alle persistenten Klassen abgeleit...
Definition GloPersistent.h:242
virtual int setGloAttribute(const AttributeID &rAttributeID, void *pPara)
virtual int setWatch(TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack=0) override
virtual int preDeleteInBase(EnDeepMode eDeepMode, void *&prData)
virtual void removeInObjectSpy() const override
virtual int lock(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) override
virtual unsigned long getGloClassID() const override
virtual int refresh() override
virtual int store(EnDeepMode eDeepMode=DM_SHALLOW) override
virtual void * getGloAttribute(const AttributeID &rAttributeID)
std::time_t m_dtCreateDate
Definition GloPersistent.h:268
virtual int unlock(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) override
virtual int unsetWatch(TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack=0) override
virtual int relock(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) override
virtual void _postAssign(Base &rBase)
Persistent(const Persistent &rT)
ObjID m_ObjID
Definition GloPersistent.h:256
virtual void postSetWatch(int iSetWatchErr, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack, void *pData)
virtual void takeOverRecord(Record *pRecord) override
virtual int assign(Base &rBase) override
virtual std::time_t getCreateDate() const override
virtual void * getGloAttribute(const std::string &rstrAttributName)
virtual ObjID getObjID() const override
std::time_t m_dtLastChange
Definition GloPersistent.h:281
virtual void setCreateDate() override
virtual int preLock(EnLockMode eLockMode, EnDeepMode eDeepMode, void *&prData)
virtual void postUnlock(int iUnlockErr, EnLockMode eLockMode, EnDeepMode eDeepMode, void *pData)
virtual void postDeleteInBase(int iDeleteErr, EnDeepMode eDeepMode, void *pData)
virtual void postLock(int iLockErr, EnLockMode eLockMode, EnDeepMode eDeepMode, void *pData)
virtual int deleteInBase(EnDeepMode eDeepMode=DM_SHALLOW) override
virtual bool isSameOrSuperClassFrom(const std::shared_ptr< glo::Persistent > pPersistent) const
Prüft ob übergebenes Objekt auf dieses gecastet werden kann.
virtual void insertInObjectSpy() const override
virtual void activate()
virtual int getTypeAsString(std::string &rsTypeName) override
virtual int preRelock(EnLockMode eLockMode, EnDeepMode eDeepMode, void *&prData)
virtual int preStore(EnDeepMode eDeepMode, void *&prData)
virtual bool isSameOrSuperClassFrom(const glo::Persistent *pPersistent) const
Prüft ob übergebenes Objekt auf dieses gecastet werden kann.
virtual void removeBase() override
virtual void postRelock(int iLockErr, EnLockMode eLockMode, EnDeepMode eDeepMode, void *pData)
virtual void postStore(int iStoreErr, EnDeepMode eDeepMode, void *pData)
virtual int preRefresh(void *&prData)
virtual void postRefresh(int iRefreshErr, void *pData)
virtual int preUnsetWatch(TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack, void *&prData)
virtual int setGloAttribute(const std::string &rstrAttributName, void *pPara)
virtual int preUnlock(EnLockMode eLockMode, EnDeepMode eDeepMode, void *&prData)
virtual ~Persistent()
virtual std::time_t getLastChangeDate() const override
virtual void postUnsetWatch(int iUnsetWatchErr, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack, void *pData)
virtual int preSetWatch(TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack, void *&prData)
Objekte dieser Klasse transportieren die Daten von den Tabellen ins persistente Objekt und von diesen...
Definition GloRecord.h:108
Definition GloAbstractBaseLot.h:49
EnDeepMode
Definition GloTypes.h:254
EnLockMode
Definition GloTypes.h:1055
unsigned long TdWatchNotifyMode
Definition GloTypes.h:558