GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloBaseLot.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLOBASELOT_H
2#define INC_GLOBASELOT_H
3//-----------------------------------------------------------------------------
36//-----------------------------------------------------------------------------
37#include "GloTypes.h"
38#include "GloAbstractBaseLot.h"
41#include <list>
42//-----------------------------------------------------------------------------
43#ifdef _MSC_VER
44 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
45 #pragma warning( disable : 4251 )
46#endif
47//-----------------------------------------------------------------------------
48namespace glo
49{
50 //---------------------------------------------------------------------------
51 /* Forwards */
52 class Reference;
53 //---------------------------------------------------------------------------
66 {
67 private:
68 //============== Attribute
69 //-----------------------------------------------------------------------
84 std::shared_ptr< LockSpecification > m_spLockSpecification;
85 //-----------------------------------------------------------------------
102 std::shared_ptr < WatchSpecification > m_spWatchSpecification;
103 //-----------------------------------------------------------------------
104
105 protected:
106 //============== Attribute
107 //-----------------------------------------------------------------------
119 unsigned long m_ulClassID;
120 //-----------------------------------------------------------------------
121
122 public:
123 //============== Konstruktoren
124 //-----------------------------------------------------------------------
135 //-----------------------------------------------------------------------
147 BaseLot( Base & rBase );
148 //-----------------------------------------------------------------------
158 virtual ~BaseLot();
159 //-----------------------------------------------------------------------
160
161 private:
162 //============== Konstruktoren
163 //-----------------------------------------------------------------------
173 BaseLot( const BaseLot & );
174 //-----------------------------------------------------------------------
175
176 public:
177 //============== Methoden
178 //-----------------------------------------------------------------------
192 virtual int getTypeAsString( std::string & rsTypeName ) override;
193 //-----------------------------------------------------------------------
210 virtual int insertPers( BasePersistent * pNewObj );
211 //-----------------------------------------------------------------------
228 virtual int insertPers( std::shared_ptr<BasePersistent> spNewObj );
229 //-----------------------------------------------------------------------
248 virtual int insertPersBefore( BasePersistent * pNewObj,
249 const BasePersistent * pObject );
250 //-----------------------------------------------------------------------
269 virtual int insertPersBefore( std::shared_ptr<BasePersistent> spNewObj,
270 const std::shared_ptr<BasePersistent> spObject );
271 //-----------------------------------------------------------------------
288 virtual int appendPers( BasePersistent * pNewObj );
289 //-----------------------------------------------------------------------
305 virtual int appendPers( std::shared_ptr<BasePersistent> spNewObj );
306 //-----------------------------------------------------------------------
320 virtual int removePers( BasePersistent * pObject ) = 0;
321 //-----------------------------------------------------------------------
335 virtual int removePers( std::shared_ptr<BasePersistent> spObject );
336 //-----------------------------------------------------------------------
377 virtual int getPers( BasePersistent *& prRetVal, EnSeekMode eMode ) = 0;
378 //-----------------------------------------------------------------------
414 virtual int getPers( std::shared_ptr<BasePersistent> & rRetVal, EnSeekMode eMode );
415 //-----------------------------------------------------------------------
451 virtual int getObjID( ObjID & rObjID, EnSeekMode eMode ) = 0;
452 //-----------------------------------------------------------------------
462 virtual bool inLot( const ObjID & rObjID ) const override = 0;
463 //-----------------------------------------------------------------------
477 virtual bool inLot( const BasePersistent & rObject ) const;
478 //-----------------------------------------------------------------------
492 virtual bool inLot( const std::shared_ptr<BasePersistent> spObject ) const;
493 //-----------------------------------------------------------------------
494 //-----------------------------------------------------------------------
495 // doxygen -> warning: unable to resolve reference to 'GLO_LOCKING_OBJS' for \ref command
496 // doxygen -> warning: unable to resolve reference to 'GLO_LOCKING_OBJ' for \ref command
497 // doxygen -> warning: unable to resolve reference to 'PAGE_GLO_WATCH_NOTIFY' for \ref command
498 // Are references to the GlobalObjects documentation.
499 //-----------------------------------------------------------------------
525 virtual int lock( EnLockMode eLockMode = LK_DELETEvWRITE,
526 EnDeepMode eDeepMode = DM_SHALLOW );
527 //-----------------------------------------------------------------------
551 virtual int lock( const LockSpecification & rLockSpecification );
552 //-----------------------------------------------------------------------
578 virtual int unlock( EnLockMode eLockMode = LK_DELETEvWRITE,
579 EnDeepMode eDeepMode = DM_SHALLOW );
580 //-----------------------------------------------------------------------
604 virtual int unlock( const LockSpecification & rLockSpecification );
605 //-----------------------------------------------------------------------
654 virtual int setWatch( TdWatchNotifyMode ulWatchMode,
655 EnDeepMode eDeepMode,
656 CallBack * pCallBack = 0 );
657 //-----------------------------------------------------------------------
706 virtual int unsetWatch( TdWatchNotifyMode ulWatchMode,
707 EnDeepMode eDeepMode,
708 CallBack * pCallBack = 0 );
709 //-----------------------------------------------------------------------
731 virtual int setWatch( const WatchSpecification & rWatchSpec );
732 //-----------------------------------------------------------------------
758 virtual int unsetWatch( const WatchSpecification & rWatchSpec );
759 //-----------------------------------------------------------------------
771 virtual void clear() = 0;
772 //-----------------------------------------------------------------------
773
774 protected:
775 //============== Methoden
776 //-----------------------------------------------------------------------
790 int takeOverBase( const BasePersistent * pObj );
791 //-----------------------------------------------------------------------
806 int takeOverBase( const Reference * pRef );
807 //-----------------------------------------------------------------------
825 int lockObjID( const ObjID & rObjID );
826 //-----------------------------------------------------------------------
844 int unlockObjID( const ObjID & rObjID );
845 //-----------------------------------------------------------------------
861 int setWatchObjID( const ObjID & rObjID );
862 //-----------------------------------------------------------------------
880 int unsetWatchObjID( const ObjID & rObjID );
881 //-----------------------------------------------------------------------
882
883 private:
884 //============== Operatoren
885 //-----------------------------------------------------------------------
895 inline BaseLot & operator= ( const BaseLot & );
896 //-----------------------------------------------------------------------
897 };
898 //---------------------------------------------------------------------------
899} // namespace glo
900//-----------------------------------------------------------------------------
901#ifdef _MSC_VER
902 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
903 #pragma warning( default : 4251 )
904#endif
905//-----------------------------------------------------------------------------
906#endif
Header für AbstractBaseLot
Header für LockSpecification
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:63
Header für WatchSpecification
Die Basisklasse für Container mit persistenten Objekten.
Definition GloAbstractBaseLot.h:62
Diese Klasse ist die Schnittstelle zu den persistenten Objekten. Hier können "Objekte" angemeldet,...
Definition GloBase.h:250
Ist die Basisklasse von Pointer- und Ondemand-Sets bzw. Pointer- und Ondemand-Listen.
Definition GloBaseLot.h:66
virtual int insertPersBefore(BasePersistent *pNewObj, const BasePersistent *pObject)
virtual int appendPers(std::shared_ptr< BasePersistent > spNewObj)
virtual bool inLot(const BasePersistent &rObject) const
std::shared_ptr< LockSpecification > m_spLockSpecification
Definition GloBaseLot.h:84
virtual int getPers(BasePersistent *&prRetVal, EnSeekMode eMode)=0
virtual int getPers(std::shared_ptr< BasePersistent > &rRetVal, EnSeekMode eMode)
virtual int unsetWatch(TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack=0)
virtual int removePers(BasePersistent *pObject)=0
virtual int setWatch(TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack=0)
virtual int getTypeAsString(std::string &rsTypeName) override
unsigned long m_ulClassID
Definition GloBaseLot.h:119
int takeOverBase(const Reference *pRef)
virtual int insertPersBefore(std::shared_ptr< BasePersistent > spNewObj, const std::shared_ptr< BasePersistent > spObject)
int lockObjID(const ObjID &rObjID)
virtual int unsetWatch(const WatchSpecification &rWatchSpec)
virtual int unlock(const LockSpecification &rLockSpecification)
virtual int appendPers(BasePersistent *pNewObj)
std::shared_ptr< WatchSpecification > m_spWatchSpecification
Definition GloBaseLot.h:102
virtual int setWatch(const WatchSpecification &rWatchSpec)
virtual int insertPers(std::shared_ptr< BasePersistent > spNewObj)
virtual int lock(const LockSpecification &rLockSpecification)
int setWatchObjID(const ObjID &rObjID)
virtual int lock(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW)
int takeOverBase(const BasePersistent *pObj)
virtual int getObjID(ObjID &rObjID, EnSeekMode eMode)=0
virtual int insertPers(BasePersistent *pNewObj)
virtual bool inLot(const ObjID &rObjID) const override=0
virtual bool inLot(const std::shared_ptr< BasePersistent > spObject) const
virtual int removePers(std::shared_ptr< BasePersistent > spObject)
virtual void clear()=0
int unlockObjID(const ObjID &rObjID)
virtual ~BaseLot()
virtual int unlock(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW)
BaseLot(const BaseLot &)
BaseLot(Base &rBase)
int unsetWatchObjID(const ObjID &rObjID)
Abstrakte Basisklasse für Persistent und die generische GenericPersistent.
Definition GloBasePersistent.h:102
Oberklasse für die Klassen, welche mit einer Base 'verbunden' sind.
Definition GloCallBack.h:74
Um Objekte sperren zu können, werden der 'Lock-Modus' und die 'Sperrtiefe' als Parameter benötigt....
Definition GloLockSpecification.h:58
Ein Objekt-ID besteht aus der Klassen-ID, einer Datenbank-ID und der eigentlichen eindeutigen ObjektZ...
Definition GloObjID.h:77
Die Basisklasse eines Referenz-Attributs von persistenten Objekten auf andere persistente Objekte in ...
Definition GloReference.h:65
Um Objekte beobachten zu können, müssen der 'Beobachtungsmodus', die 'Beobachtungstiefe' und das 'Ben...
Definition GloWatchSpecification.h:60
Definition GloAbstractBaseLot.h:42
EnDeepMode
Definition GloTypes.h:247
EnLockMode
Definition GloTypes.h:1070
EnSeekMode
Definition GloTypes.h:166
unsigned long TdWatchNotifyMode
Definition GloTypes.h:543