GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloBase.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLOBASE_H
2#define INC_GLOBASE_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include <map>
45#include <list>
46#include <set>
47#include <vector>
48#include "GloTypes.h"
50#include "GloTOndemand.h"
51#include <string>
52#if defined (__PTHREADS)
53 #include <EuPCriticalSection.h>
54#else
55 #include "EuCriticalSection.h"
56#endif
57//-----------------------------------------------------------------------------
58namespace glo
59{
60 //---------------------------------------------------------------------------
61 /* Forwards */
62 class BaseLot;
63 class BasePersistent;
64 class ClassInfo;
65 class Communicator;
66 class GenPersObjectSpy;
67 class LimitRecord;
68 class ObjCreator;
69 class ObjectMaker;
70 class Persistent;
71 class PersObjectSpy;
72 class PrivateBase;
73 class Record;
74 struct ClientInfo;
75 //---------------------------------------------------------------------------
90 //---------------------------------------------------------------------------
105 //---------------------------------------------------------------------------
119 __glo_export_dll EnDeepMode getDeepModeAsEnum( const std::string & rsDeepMode );
120 //---------------------------------------------------------------------------
134 __glo_export_dll EnLockMode getLockModeAsEnum( const std::string & rsLockMode );
135 //---------------------------------------------------------------------------
136 #ifdef _MSC_VER
137 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
138 #pragma warning( disable : 4251 )
139 #endif
140 //---------------------------------------------------------------------------
141 // doxygen -> warning: unable to resolve reference to 'GLO_EX_DB_INI' for \ref command
142 // doxygen -> warning: unable to resolve reference to 'GLO_FIRST_START_DBINI' for \ref command
143 // doxygen -> warning: unable to resolve reference to 'GLO_LOCKING_ASK_LOCK' for \ref command
144 // doxygen -> warning: unable to resolve reference to 'GLO_LOCKING_OBJ' for \ref command
145 // doxygen -> warning: unable to resolve reference to 'GLO_LOCKING_OBJS' for \ref command
146 // doxygen -> warning: unable to resolve reference to 'PAGE_GLO_TRANSACTION' for \ref command
147 // doxygen -> warning: unable to resolve reference to 'PAGE_GLO_WATCH_NOTIFY' for \ref command
148 // are references to the GlobalObjects documentation.
149 //---------------------------------------------------------------------------
256 //---------------------------------------------------------------------------
257 /* Forwards */
258 //---------------------------------------------------------------------------
259 class OpenedDatabases;
260 //---------------------------------------------------------------------------
261
263 {
264 private:
265 //============== Friends
266 //-----------------------------------------------------------------------
267 friend class ObjectMaker;
268 friend class Persistent;
270 //-----------------------------------------------------------------------
271
272 //============== Attribute
273 //-----------------------------------------------------------------------
286 //-----------------------------------------------------------------------
296 std::shared_ptr<PrivateBase> m_spPrivateBase;
297 //-----------------------------------------------------------------------
310 #if defined (__PTHREADS)
312 #else
314 #endif
315 //-----------------------------------------------------------------------
316
317 public:
318 //============== Konstruktoren
319 //-----------------------------------------------------------------------
332 //-----------------------------------------------------------------------
346 Base( const std::string & rstrClientName );
347 //-----------------------------------------------------------------------
375 Base( const std::string & rstrClientName,
376 const std::string & rstrSchemaPath,
377 const std::string & rstrBaseName );
378 //-----------------------------------------------------------------------
404 Base( const std::string & rstrClientName,
405 ObjCreator & rObjCreator );
406 //-----------------------------------------------------------------------
430 Base( const std::string & rstrServerName,
431 const std::string & rstrClientName );
432 //-----------------------------------------------------------------------
474 Base( const std::string & rstrServerName,
475 const std::string & rstrClientName,
476 int iTimeOutSec,
477 unsigned int uiPort,
478 const std::string & rstrSchemaPath,
479 const std::string & rstrKnownSchemes );
480 //-----------------------------------------------------------------------
524 Base( const std::string & rstrServerName,
525 const std::string & rstrClientName,
526 ObjCreator & rObjCreator );
527 //-----------------------------------------------------------------------
539 virtual ~Base();
540 //-----------------------------------------------------------------------
541
542 private:
543 //============== Konstruktoren
544 //-----------------------------------------------------------------------
554 Base( const Base & );
555 //-----------------------------------------------------------------------
556
557 public:
558 //============== Get- und Set-Methoden
559 //-----------------------------------------------------------------------
586 int setDbIniName( const std::string & rstrDbIniName );
587 //-----------------------------------------------------------------------
600 std::string getDbIniName() const;
601 //-----------------------------------------------------------------------
619 int getDefaultLimits( std::vector< LimitRecord > *& prRetValVector ) const;
620 //-----------------------------------------------------------------------
630 std::string getServerName() const;
631 //-----------------------------------------------------------------------
645 int getPort( unsigned int & ruiPort );
646 //-----------------------------------------------------------------------
661 int getTimeOutSec( int & riTimeOutSec );
662 //-----------------------------------------------------------------------
676 int setClientName( const std::string & rstrClientName );
677 //-----------------------------------------------------------------------
689 std::string getClientName() const;
690 //-----------------------------------------------------------------------
704 int setSchemaPath( const std::string & rstrSchemaPath );
705 //-----------------------------------------------------------------------
719 int getSchemaPath( std::string & rstrRetVal );
720 //-----------------------------------------------------------------------
736 int getSchemaNameWithPath( std::string & rstrRetVal );
737 //-----------------------------------------------------------------------
751 int setKnownSchemes( const std::string & rstrKnownSchemes );
752 //-----------------------------------------------------------------------
766 int getKnownSchemes( std::vector< std::string > & rRetVal );
767 //-----------------------------------------------------------------------
781 int setBaseName( const std::string & rstrBaseName );
782 //-----------------------------------------------------------------------
792 std::string getBaseName() const;
793 //-----------------------------------------------------------------------
803 unsigned int getCommunicatorID() const;
804 //-----------------------------------------------------------------------
815 //-----------------------------------------------------------------------
816
817 //============== Verbindungs-Methoden
818 //-----------------------------------------------------------------------
853 int connect( CallBack * pServerCrashNotificationCallBack = nullptr );
854 //-----------------------------------------------------------------------
876 int reconnect( CallBack * pServerCrashNotificationCallBack = nullptr );
877 //-----------------------------------------------------------------------
891 //-----------------------------------------------------------------------
902 bool isConnected() const;
903 //-----------------------------------------------------------------------
933 int open( const std::string & rstrBaseName,
934 CallBack * pProgressNotificationCallBack = nullptr );
935 //-----------------------------------------------------------------------
958 int close( CallBack * pProgressNotificationCallBack = nullptr );
959 //-----------------------------------------------------------------------
971 bool isOpen() const;
972 //-----------------------------------------------------------------------
984 unsigned long getBaseID() const;
985 //-----------------------------------------------------------------------
1020 int openBase( CallBack * pProgressNotificationCallBack = nullptr,
1021 CallBack * pServerCrashNotificationCallBack = nullptr );
1022 //-----------------------------------------------------------------------
1059 int openBaseComfortably( CallBack * pProgressNotificationCallBack = nullptr,
1060 CallBack * pServerCrashNotificationCallBack = nullptr );
1061 //-----------------------------------------------------------------------
1086 int closeBase( CallBack * pProgressNotificationCallBack = nullptr );
1087 //-----------------------------------------------------------------------
1088
1089 //============== Reparatur-Methoden
1090 //-----------------------------------------------------------------------
1120 int reindexBase( const std::string & rstrBaseName,
1121 CallBack * pProgressNotificationCallBack = nullptr );
1122 //-----------------------------------------------------------------------
1150 int reindexBase( CallBack * pProgressNotificationCallBack = nullptr );
1151 //-----------------------------------------------------------------------
1184 int compressBase( const std::string & rstrBaseName,
1185 CallBack * pProgressNotificationCallBack = nullptr );
1186 //-----------------------------------------------------------------------
1218 int compressBase( CallBack * pProgressNotificationCallBack = nullptr );
1219 //-----------------------------------------------------------------------
1280 int repairBase( const std::string & rstrBaseName,
1281 CallBack * pProgressNotificationCallBack = nullptr );
1282 //-----------------------------------------------------------------------
1344 int repairBase( CallBack * pProgressNotificationCallBack = nullptr );
1345 //-----------------------------------------------------------------------
1346
1347 //============== Informations-Methoden
1348 //-----------------------------------------------------------------------
1366 int getAllBases( std::vector< std::string > *& prRetValVector ) const;
1367 //-----------------------------------------------------------------------
1385 int getBaseCount( std::vector<std::string>::size_type & rBaseCount ) const;
1386 //-----------------------------------------------------------------------
1421 int getRootClassInfo( ClassInfo *& prRootClassInfo,
1422 const std::string & rstrBaseName = "" ) const;
1423 //-----------------------------------------------------------------------
1448 int getRootClassInfo( std::shared_ptr<ClassInfo> & rRootClassInfo,
1449 const std::string & rstrBaseName = "" ) const;
1450 //-----------------------------------------------------------------------
1487 int getClassInfo( ClassInfo *& prClassInfo,
1488 unsigned long ulClassID,
1489 const std::string & rstrBaseName = "" ) const;
1490 //-----------------------------------------------------------------------
1517 int getClassInfo( std::shared_ptr<ClassInfo> & rRetVal,
1518 unsigned long ulClassID,
1519 const std::string & rstrBaseName = "" ) const;
1520 //-----------------------------------------------------------------------
1557 int getClassInfo( ClassInfo *& prClassInfo,
1558 const std::string & rstrClassName,
1559 const std::string & rstrBaseName = "" ) const;
1560 //-----------------------------------------------------------------------
1587 int getClassInfo( std::shared_ptr<ClassInfo> & rRetVal,
1588 const std::string & rstrClassName,
1589 const std::string & rstrBaseName = "" ) const;
1590 //-----------------------------------------------------------------------
1632 int getSuperClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > *& prSuperClassInfoMap,
1633 unsigned long ulClassID,
1634 const std::string & rstrBaseName = "" ) const;
1635 //-----------------------------------------------------------------------
1667 int getSuperClassInfos( std::map< unsigned long, std::shared_ptr<ClassInfo>, std::less<unsigned long> > & rBaseClassInfoMap,
1668 unsigned long ulClassID,
1669 const std::string & rstrBaseName = "" ) const;
1670 //-----------------------------------------------------------------------
1712 int getSubClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > *& prSubClassInfoMap,
1713 unsigned long ulClassID,
1714 const std::string & rstrBaseName = "" ) const;
1715 //-----------------------------------------------------------------------
1748 int getSubClassInfos( std::map< unsigned long, std::shared_ptr<ClassInfo>, std::less<unsigned long> > & rSubClassInfoMap,
1749 unsigned long ulClassID,
1750 const std::string & rstrBaseName = "" ) const;
1751 //-----------------------------------------------------------------------
1793 int getAllSuperClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > *& prSuperClassInfoMap,
1794 unsigned long ulClassID,
1795 const std::string & rstrBaseName = "" ) const;
1796 //-----------------------------------------------------------------------
1827 int getAllSuperClassInfos( std::map< unsigned long, std::shared_ptr<ClassInfo>, std::less<unsigned long> > & rBaseClassInfoMap,
1828 unsigned long ulClassID,
1829 const std::string & rstrBaseName = "" ) const;
1830 //-----------------------------------------------------------------------
1872 int getAllSubClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > *& prSubClassInfoMap,
1873 unsigned long ulClassID,
1874 const std::string & rstrBaseName = "" ) const;
1875 //-----------------------------------------------------------------------
1906 int getAllSubClassInfos( std::map< unsigned long, std::shared_ptr<ClassInfo>, std::less<unsigned long> > & rSubClassInfoMap,
1907 unsigned long ulClassID,
1908 const std::string & rstrBaseName = "" ) const;
1909 //-----------------------------------------------------------------------
1945 int getAllClassInfosFromBase( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > *& prAllClassInfoMap,
1946 const std::string & rstrBaseName = "" ) const;
1947 //-----------------------------------------------------------------------
1972 int getAllClassInfosFromBase( std::map< unsigned long, std::shared_ptr<ClassInfo>, std::less<unsigned long> > & rAllClassInfoMap,
1973 const std::string & rstrBaseName = "" ) const;
1974 //-----------------------------------------------------------------------
2001 int getClassInfoCount( std::map< unsigned long, ClassInfo *, std::less<unsigned long> >::size_type & rClassInfoCount,
2002 const std::string & rstrBaseName = "" ) const;
2003 //-----------------------------------------------------------------------
2030 int isKnownClassID( bool & rbRetVal,
2031 unsigned long ulClassID,
2032 const std::string & rstrBaseName = "" ) const;
2033 //-----------------------------------------------------------------------
2063 int isSuperClassFrom( bool & rbRetVal,
2064 unsigned long ulClassIDSuperClass,
2065 unsigned long ulClassIDSubClass,
2066 const std::string & rstrBaseName = "" ) const;
2067 //-----------------------------------------------------------------------
2098 int indexAvailable( const std::string & rsIndexName,
2099 unsigned long ulClassID,
2100 const std::string & rstrBaseName = "" ) const;
2101 //-----------------------------------------------------------------------
2133 int getLimits( LimitRecord *& prLimitRecord,
2134 const ClassInfoAttribute::Type & rClassInfoAttributeType ) const;
2135 //-----------------------------------------------------------------------
2157 int getLimits( std::shared_ptr<LimitRecord> & rLimitRecord,
2158 const ClassInfoAttribute::Type & rClassInfoAttributeType ) const;
2159 //-----------------------------------------------------------------------
2188 int getAllLoggedClients( std::vector< ClientInfo > & rClientInfoVector,
2189 const std::string & rstrBaseName = "" ) const;
2190 //-----------------------------------------------------------------------
2191
2192 //============== Record-Methoden
2193 //-----------------------------------------------------------------------
2238 int getRecord( Record *& prRecord,
2239 const ObjID & rObjID,
2240 unsigned long ulClassID ) const;
2241 //-----------------------------------------------------------------------
2277 int getRecord( std::shared_ptr<Record> & rRecord,
2278 const ObjID & rObjID,
2279 unsigned long ulClassID ) const;
2280 //-----------------------------------------------------------------------
2281
2282 //============== Objekt-Methoden
2283 //-----------------------------------------------------------------------
2298 int assignObject( BasePersistent * pObject ) const;
2299 //-----------------------------------------------------------------------
2320 EnDeepMode eDeepMode ) const;
2321 //-----------------------------------------------------------------------
2343 int notifyAsWritten( const std::list< ObjID > & rObjIDList ) const;
2344 //-----------------------------------------------------------------------
2365 EnDeepMode eDeepMode ) const;
2366 //-----------------------------------------------------------------------
2412 int deleteObjects( const std::vector< glo::ObjID > & rObjectIDs,
2413 EnDeepMode eDeepMode = glo::DM_SHALLOW ) const;
2414 //-----------------------------------------------------------------------
2448 int getAnObject( BasePersistent *& prObject,
2449 const ObjID & rObjID,
2450 bool bGeneric = false ) const;
2451 //-----------------------------------------------------------------------
2476 int getAnObject( std::shared_ptr<BasePersistent> & rObject,
2477 const ObjID & rObjID,
2478 bool bGeneric = false ) const;
2479 //-----------------------------------------------------------------------
2501 int refreshObject( BasePersistent * pObject ) const;
2502 //-----------------------------------------------------------------------
2518 int isStoredObject( bool & rbRetVal, BasePersistent * pObject ) const;
2519 //-----------------------------------------------------------------------
2520
2521 //============== AllSet-Methoden
2522 //-----------------------------------------------------------------------
2541 int openAllSet( BaseAllSet * pAllSet ) const;
2542 //-----------------------------------------------------------------------
2556 int closeAllSet( BaseAllSet * pAllSet ) const;
2557 //-----------------------------------------------------------------------
2575 int objIDInAllSet( const ObjID & rObjID,
2576 const BaseAllSet & rAllSet ) const;
2577 //-----------------------------------------------------------------------
2595 int setCurrentObjectInAllSet( const ObjID & rObjID,
2596 const BaseAllSet & rAllSet ) const;
2597 //-----------------------------------------------------------------------
2615 int setPositionInAllSet( std::size_t nPosition,
2616 const BaseAllSet & rAllSet ) const;
2617 //-----------------------------------------------------------------------
2656 const BaseAllSet & rAllSet,
2657 EnSeekMode eMode ) const;
2658 //-----------------------------------------------------------------------
2708 BasePersistent *& prObject,
2709 const BaseAllSet & rAllSet,
2710 EnSeekMode eMode,
2711 bool bGeneric = false ) const;
2712 //-----------------------------------------------------------------------
2736 int setIndexFilter( const BaseAllSet & rAllSet,
2737 const std::string & rsIndexFilter ) const;
2738 //-----------------------------------------------------------------------
2776 int setIndexFilter( const BaseAllSet & rAllSet,
2777 const std::string & rsIndexFilter,
2778 EnComparisionOp eComparisionOp ) const;
2779 //-----------------------------------------------------------------------
2814 int setIndexFilter( const BaseAllSet & rAllSet,
2815 const std::string & rsRangeStartIndexFilter,
2816 const std::string & rsRangeEndIndexFilter ) const;
2817 //-----------------------------------------------------------------------
2831 int removeIndexFilter( const BaseAllSet & rAllSet ) const;
2832 //-----------------------------------------------------------------------
2865 int getIndexedObjIdsFromAllSet( std::vector< glo::ObjID > & rObjIDContainer,
2866 const BaseAllSet & rAllSet,
2867 const std::string & rsIndexSearchValue,
2868 EnQueryType eQuerryType ) const;
2869 //-----------------------------------------------------------------------
2908 int getIndexedObjIdsFromAllSet( std::vector< glo::ObjID > & rObjIDContainer,
2909 const BaseAllSet & rAllSet,
2910 const std::string & rsIndexName,
2911 unsigned long ulIndexClassID,
2912 const std::string & rsIndexSearchValue,
2913 EnQueryType eQuerryType ) const;
2914 //-----------------------------------------------------------------------
2955 int getIndexedObjIdsFromAllSet( std::vector< glo::ObjID > & rObjIDContainer,
2956 const BaseAllSet & rAllSet,
2957 const std::string & rsIndexSearchValue,
2958 EnComparisionOp eComparisionOp ) const;
2959 //-----------------------------------------------------------------------
3006 int getIndexedObjIdsFromAllSet( std::vector< glo::ObjID > & rObjIDContainer,
3007 const BaseAllSet & rAllSet,
3008 const std::string & rsIndexName,
3009 unsigned long ulIndexClassID,
3010 const std::string & rsIndexSearchValue,
3011 EnComparisionOp eComparisionOp ) const;
3012 //-----------------------------------------------------------------------
3050 int getIndexedObjIdsFromAllSet( std::vector< glo::ObjID > & rObjIDContainer,
3051 const BaseAllSet & rAllSet,
3052 const std::string & rsRangeStartIndexSearchValue,
3053 const std::string & rsRangeEndIndexSearchValue ) const;
3054 //-----------------------------------------------------------------------
3098 int getIndexedObjIdsFromAllSet( std::vector< glo::ObjID > & rObjIDContainer,
3099 const BaseAllSet & rAllSet,
3100 const std::string & rsIndexName,
3101 unsigned long ulIndexClassID,
3102 const std::string & rsRangeStartIndexSearchValue,
3103 const std::string & rsRangeEndIndexSearchValue ) const;
3104 //-----------------------------------------------------------------------
3120 int getSizeFromAllSet( std::size_t & rnSize,
3121 const BaseAllSet & rAllSet ) const;
3122 //-----------------------------------------------------------------------
3123
3124 //============== Lock-Unlock-Methoden
3125 //-----------------------------------------------------------------------
3172 int lockObject( const ObjID & rObjId,
3173 EnLockMode eLockMode,
3174 EnDeepMode eDeepMode ) const;
3175 //-----------------------------------------------------------------------
3231 EnLockMode eLockMode,
3232 EnDeepMode eDeepMode ) const;
3233 //-----------------------------------------------------------------------
3272 int relockObject( const ObjID & rObjId,
3273 EnLockMode eLockMode,
3274 EnDeepMode eDeepMode ) const;
3275 //-----------------------------------------------------------------------
3323 EnLockMode eLockMode,
3324 EnDeepMode eDeepMode ) const;
3325 //-----------------------------------------------------------------------
3355 int unlockObject( const ObjID & rObjId,
3356 EnLockMode eLockMode,
3357 EnDeepMode eDeepMode ) const;
3358 //-----------------------------------------------------------------------
3384 int lockLot( const BaseLot & rObjIdLot,
3385 EnLockMode eLockMode,
3386 EnDeepMode eDeepMode ) const;
3387 //-----------------------------------------------------------------------
3417 int unlockLot( const BaseLot & rObjIdLot,
3418 EnLockMode eLockMode,
3419 EnDeepMode eDeepMode ) const;
3420 //-----------------------------------------------------------------------
3447 int lockObjIdList( std::list<ObjID> * pObjIDList,
3448 EnLockMode eLockMode,
3449 EnDeepMode eDeepMode ) const;
3450 //-----------------------------------------------------------------------
3480 int unlockObjIdList( std::list<ObjID> * pObjIDList,
3481 EnLockMode eLockMode,
3482 EnDeepMode eDeepMode ) const;
3483 //-----------------------------------------------------------------------
3505 int isLockedObject( const ObjID & rObjId,
3506 EnLockMode eLockMode,
3507 EnDeepMode eDeepMode ) const;
3508 //-----------------------------------------------------------------------
3536 int isPossible( const ObjID & rObjId,
3537 bool bRead,
3538 bool bWrite,
3539 bool bDelete,
3540 EnDeepMode eDeepMode ) const;
3541 //-----------------------------------------------------------------------
3564 LockPossibleSpecification & rLockPossibleSpecification,
3565 EnDeepMode eDeepMode ) const;
3566 //-----------------------------------------------------------------------
3567
3568 //============== Transaktions-Methoden
3569 //-----------------------------------------------------------------------
3586 int beginTransaction() const;
3587 //-----------------------------------------------------------------------
3605 //-----------------------------------------------------------------------
3607
3625 int abortTransaction() const;
3628 //-----------------------------------------------------------------------
3638 bool isInTransaction() const;
3639 //-----------------------------------------------------------------------
3650 //-----------------------------------------------------------------------
3651
3652 //============== Überwachungs-Methoden
3653 //-----------------------------------------------------------------------
3708 int setWatchObject( const ObjID & rObjId,
3709 TdWatchNotifyMode ulWatchMode,
3710 EnDeepMode eDeepMode,
3711 CallBack * pCallBack ) const;
3712 //-----------------------------------------------------------------------
3767 int unsetWatchObject( const ObjID & rObjId,
3768 TdWatchNotifyMode ulWatchMode,
3769 EnDeepMode eDeepMode,
3770 CallBack * pCallBack ) const;
3771 //-----------------------------------------------------------------------
3827 int setWatchLot( const BaseLot & rObjIdLot,
3828 TdWatchNotifyMode ulWatchMode,
3829 EnDeepMode eDeepMode,
3830 CallBack * pCallBack ) const;
3831 int setWatchLot( const std::list<ObjID> & rObjIdLot,
3832 TdWatchNotifyMode ulWatchMode,
3833 EnDeepMode eDeepMode,
3834 CallBack * pCallBack ) const;
3835 int setWatchLot( const std::vector<ObjID> & rObjIdLot,
3836 TdWatchNotifyMode ulWatchMode,
3837 EnDeepMode eDeepMode,
3838 CallBack * pCallBack ) const;
3840 //-----------------------------------------------------------------------
3896 int unsetWatchLot( const BaseLot & rObjIdLot,
3897 TdWatchNotifyMode ulWatchMode,
3898 EnDeepMode eDeepMode,
3899 CallBack * pCallBack ) const;
3900 int unsetWatchLot( const std::list<ObjID> & rObjIdLot,
3901 TdWatchNotifyMode ulWatchMode,
3902 EnDeepMode eDeepMode,
3903 CallBack * pCallBack ) const;
3904 int unsetWatchLot( const std::vector<ObjID> & rObjIdLot,
3905 TdWatchNotifyMode ulWatchMode,
3906 EnDeepMode eDeepMode,
3907 CallBack * pCallBack ) const;
3909 //-----------------------------------------------------------------------
3968 int setWatchClass( unsigned long ulClassID,
3969 TdWatchNotifyMode ulWatchMode,
3970 CallBack * pCallBack ) const;
3971 //-----------------------------------------------------------------------
4025 int unsetWatchClass( unsigned long ulClassID,
4026 TdWatchNotifyMode ulWatchMode,
4027 CallBack * pCallBack ) const;
4028 //-----------------------------------------------------------------------
4082 CallBack * pCallBack ) const;
4083 //-----------------------------------------------------------------------
4132 CallBack * pCallBack ) const;
4133 //-----------------------------------------------------------------------
4183 CallBack * pCallBack ) const;
4184 //-----------------------------------------------------------------------
4230 CallBack * pCallBack ) const;
4231 //-----------------------------------------------------------------------
4262 int setWatchServer( CallBack * pCallBack ) const;
4263 //-----------------------------------------------------------------------
4264
4265 public:
4266 //============== Hilfs-Methoden
4267 //-----------------------------------------------------------------------
4286 //-----------------------------------------------------------------------
4304 //-----------------------------------------------------------------------
4305
4306 #ifdef _GLO_TEST
4307 public:
4308 #else
4309 protected:
4310 #endif
4311 //============== Hilfs-Methoden
4312 //-----------------------------------------------------------------------
4326 std::shared_ptr < PrivateBase > getPrivateBase() const;
4327 //-----------------------------------------------------------------------
4328
4329 private:
4330 //============== Operatoren
4331 //-----------------------------------------------------------------------
4341 Base & operator= ( const Base & );
4342 //-----------------------------------------------------------------------
4343 };
4344 //---------------------------------------------------------------------------
4345 #ifdef _MSC_VER
4346 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
4347 #pragma warning( default : 4251 )
4348 #endif
4349 //---------------------------------------------------------------------------
4350} // namespace glo
4351#endif
Header für CriticalSection
Header für EuPCriticalSection
Header für ClassInfoAttribute und ClassInfoAttribute::Type
Header und Source für TOndemand
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:70
Ist ein Mutex, welcher über sein Lock-Modus abgefragt werden kann. Siehe isLocked().
Definition EuPCriticalSection.h:121
Ist ein Mutex, welcher über sein Lock-Modus abgefragt werden kann. Siehe isLocked().
Definition EuCriticalSection.h:126
Ist die Basisklasse von Template-AllSets und dem generischen AllSet.
Definition GloBaseAllSet.h:87
int getIndexedObjIdsFromAllSet(std::vector< glo::ObjID > &rObjIDContainer, const BaseAllSet &rAllSet, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp) const
eut::CriticalSection m_LocalCriticalSection
Definition GloBase.h:313
Base(const std::string &rstrServerName, const std::string &rstrClientName)
bool isConnected() const
int abortTransaction() const
Es wird eine Transaktion abgebrochen bzw.
int setWatchLot(const BaseLot &rObjIdLot, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
int repairBase(CallBack *pProgressNotificationCallBack=nullptr)
int deleteObjects(const std::vector< glo::ObjID > &rObjectIDs, EnDeepMode eDeepMode=glo::DM_SHALLOW) const
int getClassInfoCount(std::map< unsigned long, ClassInfo *, std::less< unsigned long > >::size_type &rClassInfoCount, const std::string &rstrBaseName="") const
int reindexBase(CallBack *pProgressNotificationCallBack=nullptr)
int unsetWatchObject(const ObjID &rObjId, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
int reindexBase(const std::string &rstrBaseName, CallBack *pProgressNotificationCallBack=nullptr)
std::shared_ptr< PrivateBase > getPrivateBase() const
int unlockObjIdList(std::list< ObjID > *pObjIDList, EnLockMode eLockMode, EnDeepMode eDeepMode) const
int getClassInfo(std::shared_ptr< ClassInfo > &rRetVal, unsigned long ulClassID, const std::string &rstrBaseName="") const
std::shared_ptr< PrivateBase > m_spPrivateBase
Definition GloBase.h:296
int assignObject(BasePersistent *pObject) const
int getRecord(std::shared_ptr< Record > &rRecord, const ObjID &rObjID, unsigned long ulClassID) const
int unsetWatchLot(const BaseLot &rObjIdLot, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
int getAllBases(std::vector< std::string > *&prRetValVector) const
int getProcessingPossibilities(const ObjID &rObjId, LockPossibleSpecification &rLockPossibleSpecification, EnDeepMode eDeepMode) const
int storeObject(BasePersistent *pObject, EnDeepMode eDeepMode) const
int setPositionInAllSet(std::size_t nPosition, const BaseAllSet &rAllSet) const
friend class Persistent
Definition GloBase.h:268
int compressBase(CallBack *pProgressNotificationCallBack=nullptr)
int commitTransaction() const
int closeAllSet(BaseAllSet *pAllSet) const
Base(const std::string &rstrClientName)
int unlockObject(const ObjID &rObjId, EnLockMode eLockMode, EnDeepMode eDeepMode) const
int lockLot(const BaseLot &rObjIdLot, EnLockMode eLockMode, EnDeepMode eDeepMode) const
int setCurrentObjectInAllSet(const ObjID &rObjID, const BaseAllSet &rAllSet) const
int getAllSubClassInfos(std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > &rSubClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
int beginTransaction() const
int setWatchClient(TdWatchNotifyMode ulWatchMode, CallBack *pCallBack) const
int getBaseCount(std::vector< std::string >::size_type &rBaseCount) const
int unsetWatchIndex(TdWatchNotifyMode ulWatchMode, CallBack *pCallBack) const
int unsetWatchLot(const std::list< ObjID > &rObjIdLot, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
int lockObjectAndRefresh(BasePersistent *pObject, EnLockMode eLockMode, EnDeepMode eDeepMode) const
std::string getServerName() const
int getTransactionLevel() const
bool isOpen() const
virtual ~Base()
int getAllSuperClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *&prSuperClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
int openAllSet(BaseAllSet *pAllSet) const
Base(const std::string &rstrClientName, ObjCreator &rObjCreator)
int relockObjectAndRefresh(BasePersistent *pObject, EnLockMode eLockMode, EnDeepMode eDeepMode) const
GenPersObjectSpy * getGenPersObjectSpy()
int getSchemaPath(std::string &rstrRetVal)
int getIndexedObjIdsFromAllSet(std::vector< glo::ObjID > &rObjIDContainer, const BaseAllSet &rAllSet, const std::string &rsIndexSearchValue, EnQueryType eQuerryType) const
int getClassInfo(ClassInfo *&prClassInfo, const std::string &rstrClassName, const std::string &rstrBaseName="") const
int setWatchIndex(TdWatchNotifyMode ulWatchMode, CallBack *pCallBack) const
int lockObject(const ObjID &rObjId, EnLockMode eLockMode, EnDeepMode eDeepMode) const
int removeIndexFilter(const BaseAllSet &rAllSet) const
int indexAvailable(const std::string &rsIndexName, unsigned long ulClassID, const std::string &rstrBaseName="") const
int getIndexedObjIdsFromAllSet(std::vector< glo::ObjID > &rObjIDContainer, const BaseAllSet &rAllSet, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsIndexSearchValue, EnQueryType eQuerryType) const
int getObjectFromAllSet(ObjID &rObjID, BasePersistent *&prObject, const BaseAllSet &rAllSet, EnSeekMode eMode, bool bGeneric=false) const
int repairBase(const std::string &rstrBaseName, CallBack *pProgressNotificationCallBack=nullptr)
int getLimits(std::shared_ptr< LimitRecord > &rLimitRecord, const ClassInfoAttribute::Type &rClassInfoAttributeType) const
int connect(CallBack *pServerCrashNotificationCallBack=nullptr)
int getDefaultLimits(std::vector< LimitRecord > *&prRetValVector) const
unsigned int getCommunicatorID() const
Base(const std::string &rstrClientName, const std::string &rstrSchemaPath, const std::string &rstrBaseName)
int getAllSuperClassInfos(std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > &rBaseClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
int setWatchClass(unsigned long ulClassID, TdWatchNotifyMode ulWatchMode, CallBack *pCallBack) const
friend class ObjectMaker
Definition GloBase.h:267
int isSuperClassFrom(bool &rbRetVal, unsigned long ulClassIDSuperClass, unsigned long ulClassIDSubClass, const std::string &rstrBaseName="") const
std::string getBaseName() const
OpenedDatabases * m_pOpenedDatabases
Definition GloBase.h:285
unsigned long getBaseID() const
int unsetWatchClient(TdWatchNotifyMode ulWatchMode, CallBack *pCallBack) const
int getRecord(Record *&prRecord, const ObjID &rObjID, unsigned long ulClassID) const
int getSuperClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *&prSuperClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
int getClassInfo(std::shared_ptr< ClassInfo > &rRetVal, const std::string &rstrClassName, const std::string &rstrBaseName="") const
int getAnObject(BasePersistent *&prObject, const ObjID &rObjID, bool bGeneric=false) const
int compressBase(const std::string &rstrBaseName, CallBack *pProgressNotificationCallBack=nullptr)
int getSizeFromAllSet(std::size_t &rnSize, const BaseAllSet &rAllSet) const
int getSubClassInfos(std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > &rSubClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
int getSuperClassInfos(std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > &rBaseClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
int getObjIdFromAllSet(ObjID &rObjID, const BaseAllSet &rAllSet, EnSeekMode eMode) const
Base(const std::string &rstrServerName, const std::string &rstrClientName, int iTimeOutSec, unsigned int uiPort, const std::string &rstrSchemaPath, const std::string &rstrKnownSchemes)
int getAllClassInfosFromBase(std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > &rAllClassInfoMap, const std::string &rstrBaseName="") const
int setIndexFilter(const BaseAllSet &rAllSet, const std::string &rsRangeStartIndexFilter, const std::string &rsRangeEndIndexFilter) const
int isKnownClassID(bool &rbRetVal, unsigned long ulClassID, const std::string &rstrBaseName="") const
bool isInTransaction() const
int unsetWatchLot(const std::vector< ObjID > &rObjIdLot, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
int setBaseName(const std::string &rstrBaseName)
PersObjectSpy * getPersObjectSpy()
int isPossible(const ObjID &rObjId, bool bRead, bool bWrite, bool bDelete, EnDeepMode eDeepMode) const
int notifyAsWritten(const std::list< ObjID > &rObjIDList) const
int getIndexedObjIdsFromAllSet(std::vector< glo::ObjID > &rObjIDContainer, const BaseAllSet &rAllSet, const std::string &rsRangeStartIndexSearchValue, const std::string &rsRangeEndIndexSearchValue) const
int setClientName(const std::string &rstrClientName)
int lockObjIdList(std::list< ObjID > *pObjIDList, EnLockMode eLockMode, EnDeepMode eDeepMode) const
int getPort(unsigned int &ruiPort)
int getAllLoggedClients(std::vector< ClientInfo > &rClientInfoVector, const std::string &rstrBaseName="") const
int openBaseComfortably(CallBack *pProgressNotificationCallBack=nullptr, CallBack *pServerCrashNotificationCallBack=nullptr)
int getIndexedObjIdsFromAllSet(std::vector< glo::ObjID > &rObjIDContainer, const BaseAllSet &rAllSet, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp) const
int getSubClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *&prSubClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
ObjectMaker * getObjectMaker()
int disconnect()
int setSchemaPath(const std::string &rstrSchemaPath)
int setWatchObject(const ObjID &rObjId, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
int relockObject(const ObjID &rObjId, EnLockMode eLockMode, EnDeepMode eDeepMode) const
int setWatchLot(const std::list< ObjID > &rObjIdLot, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
int getRootClassInfo(ClassInfo *&prRootClassInfo, const std::string &rstrBaseName="") const
int unlockLot(const BaseLot &rObjIdLot, EnLockMode eLockMode, EnDeepMode eDeepMode) const
int getAllClassInfosFromBase(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *&prAllClassInfoMap, const std::string &rstrBaseName="") const
std::string getClientName() const
int getLimits(LimitRecord *&prLimitRecord, const ClassInfoAttribute::Type &rClassInfoAttributeType) const
int getClassInfo(ClassInfo *&prClassInfo, unsigned long ulClassID, const std::string &rstrBaseName="") const
int unsetWatchClass(unsigned long ulClassID, TdWatchNotifyMode ulWatchMode, CallBack *pCallBack) const
int getTimeOutSec(int &riTimeOutSec)
int refreshObject(BasePersistent *pObject) const
int getSchemaNameWithPath(std::string &rstrRetVal)
int closeBase(CallBack *pProgressNotificationCallBack=nullptr)
friend class EmbeddedRecordAttribute
Definition GloBase.h:269
int isLockedObject(const ObjID &rObjId, EnLockMode eLockMode, EnDeepMode eDeepMode) const
int close(CallBack *pProgressNotificationCallBack=nullptr)
int setIndexFilter(const BaseAllSet &rAllSet, const std::string &rsIndexFilter) const
int setWatchLot(const std::vector< ObjID > &rObjIdLot, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
int setKnownSchemes(const std::string &rstrKnownSchemes)
int rollBackTransaction() const
Es wird eine Transaktion abgebrochen bzw.
int isStoredObject(bool &rbRetVal, BasePersistent *pObject) const
int getKnownSchemes(std::vector< std::string > &rRetVal)
int setWatchServer(CallBack *pCallBack) const
int getIndexedObjIdsFromAllSet(std::vector< glo::ObjID > &rObjIDContainer, const BaseAllSet &rAllSet, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsRangeStartIndexSearchValue, const std::string &rsRangeEndIndexSearchValue) const
int openBase(CallBack *pProgressNotificationCallBack=nullptr, CallBack *pServerCrashNotificationCallBack=nullptr)
int reconnect(CallBack *pServerCrashNotificationCallBack=nullptr)
int deleteObject(BasePersistent *pObject, EnDeepMode eDeepMode) const
int getAnObject(std::shared_ptr< BasePersistent > &rObject, const ObjID &rObjID, bool bGeneric=false) const
Base(const std::string &rstrServerName, const std::string &rstrClientName, ObjCreator &rObjCreator)
int setIndexFilter(const BaseAllSet &rAllSet, const std::string &rsIndexFilter, EnComparisionOp eComparisionOp) const
Base(const Base &)
int setDbIniName(const std::string &rstrDbIniName)
int getAllSubClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *&prSubClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
int objIDInAllSet(const ObjID &rObjID, const BaseAllSet &rAllSet) const
int getRootClassInfo(std::shared_ptr< ClassInfo > &rRootClassInfo, const std::string &rstrBaseName="") const
int open(const std::string &rstrBaseName, CallBack *pProgressNotificationCallBack=nullptr)
std::string getDbIniName() const
Ist die Basisklasse von Pointer- und Ondemand-Sets bzw. Pointer- und Ondemand-Listen.
Definition GloBaseLot.h:73
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
Zusammengefasste Typinformationen für ein ClassInfoAttribute.
Definition GloClassInfoAttribute.h:108
Diese Klasse beinhaltet alle Informationen um Objekte einer Klasse in einer Datenbank speichern zu kö...
Definition GloClassInfo.h:86
OberKlasse von LocalThread, ClientThread und ServerThread, weil diese als Sender und Empfänger (Kommu...
Definition GloCommunicator.h:93
Klasse um die generischen persistente Objekte einer Datenbank im Speicher im Zugriff zu haben.
Definition GloGenPersObjectSpy.h:83
In Objekten dieser Klasse werden die Min- und Max-Werte von unterstützten Datentypen und deren Feldlä...
Definition GloLimitRecord.h:71
Abstrakte Oberklasse für Instanziierungsfunktionen der persistenten Klassen. Von dieser Klasse wird g...
Definition GloObjCreator.h:78
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 zum Zugriff auf die geöffneten Datenbanken.
Definition GloOpenedDatabases.h:85
Klasse um die persistente Objekte einer Datenbank im Speicher im Zugriff zu haben.
Definition GloPersObjectSpy.h:82
Die Basisklasse der persistenten Klassen. Von dieser Klasse müssen alle persistenten Klassen abgeleit...
Definition GloPersistent.h:245
In dieser Klasse werden Funktionen für Base gekapselt. Für den Fall, dass sich Änderungen in der Funk...
Definition GloPrivateBase.h:99
Objekte dieser Klasse transportieren die Daten von den Tabellen ins persistente Objekt und von diesen...
Definition GloRecord.h:108
Definition GloAbstractBaseLot.h:49
__glo_export_dll std::string getDeepModeAsString(EnDeepMode eDeepMode)
EnDeepMode
Definition GloTypes.h:273
@ DM_SHALLOW
Definition GloTypes.h:309
EnComparisionOp
Definition GloTypes.h:1590
__glo_export_dll std::string getLockModeAsString(EnLockMode eLockMode)
EnLockMode
Definition GloTypes.h:1074
__glo_export_dll EnLockMode getLockModeAsEnum(const std::string &rsLockMode)
EnSeekMode
Definition GloTypes.h:192
EnQueryType
Definition GloTypes.h:1183
__glo_export_dll EnDeepMode getDeepModeAsEnum(const std::string &rsDeepMode)
unsigned long TdWatchNotifyMode
Definition GloTypes.h:577
Eine Struktur um ClientDaten zwischen Datenbank und Client zu transportieren.
Definition GloClientInfo.h:71
Es können erlaubte Aktionen in der Datenbank wie lesen, schreiben und löschen für ein Objekt erfragt ...
Definition GloTypes.h:1279