GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloBaseLot.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLOBASELOT_H
2#define INC_GLOBASELOT_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include "GloTypes.h"
45#include "GloAbstractBaseLot.h"
48#include <list>
49//-----------------------------------------------------------------------------
50#ifdef _MSC_VER
51 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
52 #pragma warning( disable : 4251 )
53#endif
54//-----------------------------------------------------------------------------
55namespace glo
56{
57 //---------------------------------------------------------------------------
58 /* Forwards */
59 class Reference;
60 //---------------------------------------------------------------------------
73 {
74 private:
75 //============== Attribute
76 //-----------------------------------------------------------------------
91 std::shared_ptr< LockSpecification > m_spLockSpecification;
92 //-----------------------------------------------------------------------
109 std::shared_ptr < WatchSpecification > m_spWatchSpecification;
110 //-----------------------------------------------------------------------
111
112 protected:
113 //============== Attribute
114 //-----------------------------------------------------------------------
126 unsigned long m_ulClassID;
127 //-----------------------------------------------------------------------
128
129 public:
130 //============== Konstruktoren
131 //-----------------------------------------------------------------------
142 //-----------------------------------------------------------------------
152 virtual ~BaseLot();
153 //-----------------------------------------------------------------------
154
155 private:
156 //============== Konstruktoren
157 //-----------------------------------------------------------------------
167 BaseLot( const BaseLot & );
168 //-----------------------------------------------------------------------
169
170 public:
171 //============== Methoden
172 //-----------------------------------------------------------------------
199 virtual int setBase( Base * pBase ) override = 0;
200 //-----------------------------------------------------------------------
215 virtual Base * getBase() const override = 0;
216 //-----------------------------------------------------------------------
230 virtual int getTypeAsString( std::string & rsTypeName ) override;
231 //-----------------------------------------------------------------------
248 virtual int insertPers( BasePersistent * pNewObj );
249 //-----------------------------------------------------------------------
266 virtual int insertPers( std::shared_ptr<BasePersistent> spNewObj );
267 //-----------------------------------------------------------------------
286 virtual int insertPersBefore( BasePersistent * pNewObj,
287 const BasePersistent * pObject );
288 //-----------------------------------------------------------------------
307 virtual int insertPersBefore( std::shared_ptr<BasePersistent> spNewObj,
308 const std::shared_ptr<BasePersistent> spObject );
309 //-----------------------------------------------------------------------
326 virtual int appendPers( BasePersistent * pNewObj );
327 //-----------------------------------------------------------------------
343 virtual int appendPers( std::shared_ptr<BasePersistent> spNewObj );
344 //-----------------------------------------------------------------------
358 virtual int removePers( BasePersistent * pObject ) = 0;
359 //-----------------------------------------------------------------------
373 virtual int removePers( std::shared_ptr<BasePersistent> spObject );
374 //-----------------------------------------------------------------------
415 virtual int getPers( BasePersistent *& prRetVal, EnSeekMode eMode ) = 0;
416 //-----------------------------------------------------------------------
452 virtual int getPers( std::shared_ptr<BasePersistent> & rRetVal, EnSeekMode eMode );
453 //-----------------------------------------------------------------------
489 virtual int getObjID( ObjID & rObjID, EnSeekMode eMode ) = 0;
490 //-----------------------------------------------------------------------
500 virtual bool inLot( const ObjID & rObjID ) const override = 0;
501 //-----------------------------------------------------------------------
515 virtual bool inLot( const BasePersistent & rObject ) const;
516 //-----------------------------------------------------------------------
530 virtual bool inLot( const std::shared_ptr<BasePersistent> spObject ) const;
531 //-----------------------------------------------------------------------
532 //-----------------------------------------------------------------------
533 // doxygen -> warning: unable to resolve reference to 'GLO_LOCKING_OBJS' for \ref command
534 // doxygen -> warning: unable to resolve reference to 'GLO_LOCKING_OBJ' for \ref command
535 // doxygen -> warning: unable to resolve reference to 'PAGE_GLO_WATCH_NOTIFY' for \ref command
536 // Are references to the GlobalObjects documentation.
537 //-----------------------------------------------------------------------
563 virtual int lock( EnLockMode eLockMode = LK_DELETEvWRITE,
564 EnDeepMode eDeepMode = DM_SHALLOW );
565 //-----------------------------------------------------------------------
589 virtual int lock( const LockSpecification & rLockSpecification );
590 //-----------------------------------------------------------------------
616 virtual int unlock( EnLockMode eLockMode = LK_DELETEvWRITE,
617 EnDeepMode eDeepMode = DM_SHALLOW );
618 //-----------------------------------------------------------------------
642 virtual int unlock( const LockSpecification & rLockSpecification );
643 //-----------------------------------------------------------------------
694 virtual int setWatch( TdWatchNotifyMode ulWatchMode,
695 EnDeepMode eDeepMode,
696 CallBack * pCallBack = 0 );
697 //-----------------------------------------------------------------------
748 virtual int unsetWatch( TdWatchNotifyMode ulWatchMode,
749 EnDeepMode eDeepMode,
750 CallBack * pCallBack = 0 );
751 //-----------------------------------------------------------------------
773 virtual int setWatch( const WatchSpecification & rWatchSpec );
774 //-----------------------------------------------------------------------
800 virtual int unsetWatch( const WatchSpecification & rWatchSpec );
801 //-----------------------------------------------------------------------
813 virtual void clear() = 0;
814 //-----------------------------------------------------------------------
815
816 protected:
817 //============== Methoden
818 //-----------------------------------------------------------------------
832 int takeOverBase( const BasePersistent * pObj );
833 //-----------------------------------------------------------------------
848 int takeOverBase( const Reference * pRef );
849 //-----------------------------------------------------------------------
867 int lockObjID( const ObjID & rObjID );
868 //-----------------------------------------------------------------------
886 int unlockObjID( const ObjID & rObjID );
887 //-----------------------------------------------------------------------
903 int setWatchObjID( const ObjID & rObjID );
904 //-----------------------------------------------------------------------
922 int unsetWatchObjID( const ObjID & rObjID );
923 //-----------------------------------------------------------------------
924
925 private:
926 //============== Operatoren
927 //-----------------------------------------------------------------------
937 inline BaseLot & operator= ( const BaseLot & );
938 //-----------------------------------------------------------------------
939 };
940 //---------------------------------------------------------------------------
941} // namespace glo
942//-----------------------------------------------------------------------------
943#ifdef _MSC_VER
944 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
945 #pragma warning( default : 4251 )
946#endif
947//-----------------------------------------------------------------------------
948#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:70
Header für WatchSpecification
Die Basisklasse für Container mit persistenten Objekten.
Definition GloAbstractBaseLot.h:69
Definition GloBase.h:263
Ist die Basisklasse von Pointer- und Ondemand-Sets bzw. Pointer- und Ondemand-Listen.
Definition GloBaseLot.h:73
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:91
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:126
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:109
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 int setBase(Base *pBase) override=0
virtual void clear()=0
int unlockObjID(const ObjID &rObjID)
virtual ~BaseLot()
virtual Base * getBase() const override=0
virtual int unlock(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW)
BaseLot(const BaseLot &)
int unsetWatchObjID(const ObjID &rObjID)
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
Die Basisklasse eines Referenz-Attributs von persistenten Objekten auf andere persistente Objekte in ...
Definition GloReference.h:72
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
EnSeekMode
Definition GloTypes.h:173
unsigned long TdWatchNotifyMode
Definition GloTypes.h:558