GlobalObjects
Loading...
Searching...
No Matches
GloBaseLot.h
Go to the documentation of this file.
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 for AbstractBaseLot
Header for LockSpecification
For each library, here 'GlobalObjects' there is a type file.
#define __glo_export_dll
Definition GloTypes.h:70
Header for WatchSpecification
The base class for container with persistent objects.
Definition GloAbstractBaseLot.h:69
Definition GloBase.h:263
Is the base class of pointer and on-demand sets or pointer and on-demand lists.
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)
Abstract base class for Persistent and the generic GenericPersistent.
Definition GloBasePersistent.h:124
Superclass for the classes that are 'connected' to a Base.
Definition GloCallBack.h:81
To be able to lock objects, the 'lock mode' and the 'lock depth' are required as parameters....
Definition GloLockSpecification.h:65
An object ID consists of the class ID, a database ID and the actual unique object number (all unsigne...
Definition GloObjID.h:84
The base class of a reference attribute from persistent objects to other persistent objects in the da...
Definition GloReference.h:72
To be able to watch objects, the 'watching mode', the 'watching depth' and the 'notification object' ...
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