GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloReference.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLOREFERENCE_H
2#define INC_GLOREFERENCE_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include "GloTypes.h"
45#include "GloCallBack.h"
46#include "GloObjID.h"
49#include <memory>
50//-----------------------------------------------------------------------------
51namespace glo
52{
53 //---------------------------------------------------------------------------
54 /* Forwards */
55 class BasePersistent;
56 //---------------------------------------------------------------------------
72 {
73 private:
74 //============== Friends
75 //-----------------------------------------------------------------------
76 friend class ObjectMaker;
77 friend class OndemandLot;
78 friend class OndemandList;
79 friend class OndemandSet;
81 friend class BaseAllSet;
82 friend class Base;
84 //-----------------------------------------------------------------------
85
86 //============== Attribute
87 //-----------------------------------------------------------------------
97 unsigned long m_ulDatabaseID;
98 //-----------------------------------------------------------------------
109 //-----------------------------------------------------------------------
110
111 public:
112 //============== de- contructors
113 //-----------------------------------------------------------------------
124 //-----------------------------------------------------------------------
138 Reference( const ObjID & rObjID );
139 //-----------------------------------------------------------------------
153 Reference( Base & rBase );
154 //-----------------------------------------------------------------------
168 Reference( unsigned long ulDatabaseID );
169 //-----------------------------------------------------------------------
190 Reference( const ObjID & rObjID, Base & rBase );
191 //-----------------------------------------------------------------------
213 Reference( const ObjID & rObjID, unsigned long ulDatabaseID );
214 //-----------------------------------------------------------------------
226 Reference( const Reference & rT );
227 //-----------------------------------------------------------------------
237 virtual ~Reference();
238 //-----------------------------------------------------------------------
239
240 //============== Methoden
241 //-----------------------------------------------------------------------
262 virtual int setBase( Base * pBase ) override;
263 //-----------------------------------------------------------------------
278 virtual Base * getBase() const override;
279 //-----------------------------------------------------------------------
295 virtual int getTypeAsString( std::string & rsTypeName ) override;
296 //-----------------------------------------------------------------------
308 bool isNULL() const;
309 //-----------------------------------------------------------------------
319 void setNULL();
320 //-----------------------------------------------------------------------
333 //-----------------------------------------------------------------------
345 const ObjID * getObjIDAsPointer() const;
346 //-----------------------------------------------------------------------
360 virtual int setReference( const ObjID & rObjID );
361 //-----------------------------------------------------------------------
378 int setReference( const BasePersistent * pObj );
379 //-----------------------------------------------------------------------
396 int setReference( const BasePersistent & rObj );
397 //-----------------------------------------------------------------------
424 int getReference( BasePersistent *& prRetVal );
425 //-----------------------------------------------------------------------
441 int getReference( std::shared_ptr<BasePersistent> & sprRetVal );
442 //-----------------------------------------------------------------------
456 virtual int deleteInBase( EnDeepMode eDeepMode = DM_SHALLOW );
457 //-----------------------------------------------------------------------
481 virtual int lock( EnLockMode eLockMode = LK_DELETEvWRITE,
482 EnDeepMode eDeepMode = DM_SHALLOW ) const;
483 //-----------------------------------------------------------------------
505 virtual int lock( const LockSpecification & rLockSpecification ) const;
506 //-----------------------------------------------------------------------
533 virtual int unlock( EnLockMode eLockMode = LK_DELETEvWRITE,
534 EnDeepMode eDeepMode = DM_SHALLOW ) const;
535 //-----------------------------------------------------------------------
560 virtual int unlock( const LockSpecification & rLockSpecification ) const;
561 //-----------------------------------------------------------------------
584 virtual int isLocked( EnLockMode eLockMode = LK_DELETEvWRITE,
585 EnDeepMode eDeepMode = DM_SHALLOW ) const;
586 //-----------------------------------------------------------------------
606 virtual int isLocked( const LockSpecification & rLockSpecification ) const;
607 //-----------------------------------------------------------------------
631 virtual int isPossible( bool bRead,
632 bool bWrite,
633 bool bDelete,
634 EnDeepMode eDeepMode = DM_SHALLOW ) const;
635 //-----------------------------------------------------------------------
655 virtual int isPossible( const LockPossibleSpecification & rLockPossibleSpec,
656 EnDeepMode eDeepMode = DM_SHALLOW ) const;
657 //-----------------------------------------------------------------------
708 virtual int setWatch( TdWatchNotifyMode ulWatchMode,
709 EnDeepMode eDeepMode,
710 CallBack * pCallBack = 0 ) const;
711 //-----------------------------------------------------------------------
734 virtual int setWatch( const WatchSpecification & rWatchSpec ) const;
735 //-----------------------------------------------------------------------
786 virtual int unsetWatch( TdWatchNotifyMode ulWatchMode,
787 EnDeepMode eDeepMode,
788 CallBack * pCallBack ) const;
789 //-----------------------------------------------------------------------
815 virtual int unsetWatch( const WatchSpecification & rWatchSpec ) const;
816 //-----------------------------------------------------------------------
817
818 //============== Operatoren
819 //-----------------------------------------------------------------------
831 Reference & operator= ( const Reference & rT );
832 //-----------------------------------------------------------------------
834
845 bool operator== ( const Reference & rT ) const;
846 bool operator!= ( const Reference & rT ) const;
848 //-----------------------------------------------------------------------
849 };
850 //---------------------------------------------------------------------------
851} // namespace glo
852#endif
Header für CallBack
Header für LockSpecification
Header für ObjID
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:70
Header für WatchSpecification
Ist die Basisklasse von Template-AllSets und dem generischen AllSet.
Definition GloBaseAllSet.h:87
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
Um Objekte sperren zu können, werden der 'Lock-Modus' und die 'Sperrtiefe' als Parameter benötigt....
Definition GloLockSpecification.h:65
Ein Objekt-ID besteht aus der Klassen-ID, einer Datenbank-ID und der eigentlichen eindeutigen ObjektZ...
Definition GloObjID.h:84
Diese Klasse kann aus einem Datensatz ein persistentes Objekt instanziieren bzw. ein persistentes Obj...
Definition GloObjectMaker.h:70
Klasse für die Ondemand-Referenz-Attribute eines Record.
Definition GloOdRefRecordAttribute.h:70
Ist die Basisklasse von Template-Ondemand-List. Die Objekte werden in einer std::list verwaltet....
Definition GloOndemandList.h:73
Ist die abstrakte Basisklasse von Ondemand-Sets und -Listen.
Definition GloOndemandLot.h:69
Ist die Basisklasse von Template-Ondemand-Set. Objekte können nur einmalig eingefügt werden.
Definition GloOndemandSet.h:71
Die Basisklasse eines Referenz-Attributs von persistenten Objekten auf andere persistente Objekte in ...
Definition GloReference.h:72
virtual int unsetWatch(TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
virtual int setWatch(TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack=0) const
virtual int lock(const LockSpecification &rLockSpecification) const
virtual int unsetWatch(const WatchSpecification &rWatchSpec) const
virtual int setReference(const ObjID &rObjID)
int getReference(std::shared_ptr< BasePersistent > &sprRetVal)
int getReference(BasePersistent *&prRetVal)
virtual int isLocked(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const
virtual int isLocked(const LockSpecification &rLockSpecification) const
Reference(const Reference &rT)
virtual int setWatch(const WatchSpecification &rWatchSpec) const
virtual int getTypeAsString(std::string &rsTypeName) override
virtual int isPossible(bool bRead, bool bWrite, bool bDelete, EnDeepMode eDeepMode=DM_SHALLOW) const
int setReference(const BasePersistent *pObj)
int setReference(const BasePersistent &rObj)
virtual Base * getBase() const override
virtual int setBase(Base *pBase) override
Reference(unsigned long ulDatabaseID)
Reference(const ObjID &rObjID)
virtual int lock(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const
virtual int isPossible(const LockPossibleSpecification &rLockPossibleSpec, EnDeepMode eDeepMode=DM_SHALLOW) const
virtual ~Reference()
Reference(Base &rBase)
ObjID getObjID() const
virtual int deleteInBase(EnDeepMode eDeepMode=DM_SHALLOW)
bool isNULL() const
unsigned long m_ulDatabaseID
Definition GloReference.h:97
ObjID m_RefObjID
Definition GloReference.h:108
Reference(const ObjID &rObjID, unsigned long ulDatabaseID)
const ObjID * getObjIDAsPointer() const
Reference(const ObjID &rObjID, Base &rBase)
virtual int unlock(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const
virtual int unlock(const LockSpecification &rLockSpecification) const
Ein Objekt dieser Klasse greift auf Tabellen zu und liest Datensätze (Record) und Binärdateien (eut::...
Definition GloTableReaderInterface.h:87
Um Objekte beobachten zu können, müssen der 'Beobachtungsmodus', die 'Beobachtungstiefe' und das 'Ben...
Definition GloWatchSpecification.h:67
Definition GloAbstractBaseLot.h:49
EnDeepMode
Definition GloTypes.h:254
EnLockMode
Definition GloTypes.h:1055
unsigned long TdWatchNotifyMode
Definition GloTypes.h:558
Es können erlaubte Aktionen in der Datenbank wie lesen, schreiben und löschen für ein Objekt erfragt ...
Definition GloTypes.h:1256