GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloIndexPool.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLOINDEXPOOL_H
2#define INC_GLOINDEXPOOL_H
3//-----------------------------------------------------------------------------
46//-----------------------------------------------------------------------------
47#include "GloTypes.h"
49#include "GloObjID.h"
51#include "GloClassInfoIndex.h"
52#if defined (__PTHREADS)
53 #include <EuPCriticalSection.h>
54#else
55 #include "EuCriticalSection.h"
56#endif
57#include <ctime>
58#include <list>
59#include <map>
60
61#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
62 #include <basetsd.h>
63#elif defined(__GNUC__)
64 #define INT_PTR intptr_t
65#endif
66//-----------------------------------------------------------------------------
67namespace glo
68{
69 //---------------------------------------------------------------------------
70 /* Forwards */
71 class SchemaInterface;
72 class ClassInfoIndex;
73 class WatchNotifyManager;
74 //---------------------------------------------------------------------------
75 #ifdef _MSC_VER
76 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
77 #pragma warning( disable : 4251 )
78 #endif
79 //---------------------------------------------------------------------------
192 {
193 public:
194 //-----------------------------------------------------------------------
195 // >>>>>>>>>>>>>>>>>>>>>> DeletedObjIdTuple >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
196 //-----------------------------------------------------------------------
224 {
225 public:
226 //============== Attribute
227 //---------------------------------------------------------------------
238 //---------------------------------------------------------------------
264 //---------------------------------------------------------------------
265
266 //============= De- und Konstruktoren
267 //---------------------------------------------------------------------
278 //---------------------------------------------------------------------
292 DeletedObjIdTuple( const ObjID & rObjID, int iDelCounter );
293 //---------------------------------------------------------------------
306 //---------------------------------------------------------------------
317 //---------------------------------------------------------------------
318
319 //============== Methoden
320 //---------------------------------------------------------------------
332 std::string toString() const;
333 //---------------------------------------------------------------------
334
335 //============== Operatoren
336 //---------------------------------------------------------------------
349 bool operator== ( const DeletedObjIdTuple & rT ) const;
350 bool operator!= ( const DeletedObjIdTuple & rT ) const;
351 bool operator> ( const DeletedObjIdTuple & rT ) const;
352 bool operator>= ( const DeletedObjIdTuple & rT ) const;
353 bool operator< ( const DeletedObjIdTuple & rT ) const;
354 bool operator<= ( const DeletedObjIdTuple & rT ) const;
356 //---------------------------------------------------------------------
369 bool operator== ( int iDelCounter ) const;
370 bool operator!= ( int iDelCounter ) const;
371 bool operator> ( int iDelCounter ) const;
372 bool operator>= ( int iDelCounter ) const;
373 bool operator< ( int iDelCounter ) const;
374 bool operator<= ( int iDelCounter ) const;
376 //---------------------------------------------------------------------
389 //---------------------------------------------------------------------
390 };
391 //-----------------------------------------------------------------------
392 // <<<<<<<<<<<<<<<<<<<<<< DeletedObjIdTuple <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
393 //-----------------------------------------------------------------------
394
395 //-----------------------------------------------------------------------
396 // >>>>>>>>>>>>>>>>>>>>>>>> ObjIdPosTuple >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
397 //-----------------------------------------------------------------------
417 {
418 public:
419 //============== Attribute
420 //---------------------------------------------------------------------
431 //---------------------------------------------------------------------
441 std::streampos m_FilePosition;
442 //---------------------------------------------------------------------
443
444 //============= De- und Konstruktoren
445 //---------------------------------------------------------------------
456 //---------------------------------------------------------------------
471 ObjIdPosTuple( const ObjID & rObjID, std::streampos FilePosition );
472 //---------------------------------------------------------------------
485 //---------------------------------------------------------------------
495 virtual ~ObjIdPosTuple();
496 //---------------------------------------------------------------------
497
498 //============== Methoden
499 //---------------------------------------------------------------------
511 std::string toString() const;
512 //---------------------------------------------------------------------
513
514 //============== Operatoren
515 //---------------------------------------------------------------------
528 bool operator== ( const ObjIdPosTuple & rT ) const;
529 bool operator!= ( const ObjIdPosTuple & rT ) const;
530 bool operator> ( const ObjIdPosTuple & rT ) const;
531 bool operator>= ( const ObjIdPosTuple & rT ) const;
532 bool operator< ( const ObjIdPosTuple & rT ) const;
533 bool operator<= ( const ObjIdPosTuple & rT ) const;
535 //---------------------------------------------------------------------
548 bool operator== ( std::streampos Pos ) const;
549 bool operator!= ( std::streampos Pos ) const;
550 bool operator> ( std::streampos Pos ) const;
551 bool operator>= ( std::streampos Pos ) const;
552 bool operator< ( std::streampos Pos ) const;
553 bool operator<= ( std::streampos Pos ) const;
555 //---------------------------------------------------------------------
567 IndexPool::ObjIdPosTuple & operator= ( const ObjIdPosTuple & rT );
568 //---------------------------------------------------------------------
569 };
570 //-----------------------------------------------------------------------
571 // <<<<<<<<<<<<<<<<<<<<<<< ObjIdPosTuple <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
572 //-----------------------------------------------------------------------
573
574 //-----------------------------------------------------------------------
575 // >>>>>>>>>>>>>>>>>>>>>>> ObjStrIdTuple >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
576 //-----------------------------------------------------------------------
600 {
601 private:
602 //============== Attribute
603 //---------------------------------------------------------------------
621 std::string m_sIndex;
622 //---------------------------------------------------------------------
633 //---------------------------------------------------------------------
648 //---------------------------------------------------------------------
649
650 public:
651 //============= De- und Konstruktoren
652 //---------------------------------------------------------------------
663 //---------------------------------------------------------------------
685 ObjStrIdTuple( const std::string & rsIndex,
686 const ObjID & rObjID,
687 NUM_PTR ipReservingComunicatorTrx = 0 );
688 //---------------------------------------------------------------------
701 //---------------------------------------------------------------------
711 virtual ~ObjStrIdTuple();
712 //---------------------------------------------------------------------
713
714 //============== Methoden
715 //---------------------------------------------------------------------
739 void setValues( const std::string & rsIndex,
740 const ObjID & rObjID,
741 NUM_PTR ipReservingComunicatorTrx = 0 );
742 //---------------------------------------------------------------------
754 void setIndex( const std::string & rsIndex );
755 //---------------------------------------------------------------------
767 void setObjID( const ObjID & rObjID );
768 //---------------------------------------------------------------------
786 void setReservingComunicatorTrx( NUM_PTR ipReservingComunicatorTrx );
787 //---------------------------------------------------------------------
799 std::string getIndex() const;
800 //---------------------------------------------------------------------
813 //---------------------------------------------------------------------
830 //---------------------------------------------------------------------
844 std::string toString() const;
845 //---------------------------------------------------------------------
846
847 //============== Operatoren
848 //---------------------------------------------------------------------
863 bool operator== ( const ObjStrIdTuple & rT ) const;
864 bool operator!= ( const ObjStrIdTuple & rT ) const;
865 bool operator> ( const ObjStrIdTuple & rT ) const;
866 bool operator>= ( const ObjStrIdTuple & rT ) const;
867 bool operator< ( const ObjStrIdTuple & rT ) const;
868 bool operator<= ( const ObjStrIdTuple & rT ) const;
870 //---------------------------------------------------------------------
882 IndexPool::ObjStrIdTuple & operator= ( const ObjStrIdTuple & rT );
883 //---------------------------------------------------------------------
884 };
885 //-----------------------------------------------------------------------
886 // <<<<<<<<<<<<<<<<<<<<<<<< ObjStrIdTuple <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
887 //-----------------------------------------------------------------------
888
889 //-----------------------------------------------------------------------
890 // >>>>>>>>>>>>>>>>>>>>>>> TableObjIdIndex >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
891 //-----------------------------------------------------------------------
911 {
912 private:
913 //============== Attribute
914 //---------------------------------------------------------------------
926 std::string m_strPathName;
927 //---------------------------------------------------------------------
939 unsigned long m_ulClassID;
940 //---------------------------------------------------------------------
951 std::map< ObjID, ObjIdPosTuple *, std::less< ObjID > > m_ObjIDIndexMap;
952 //---------------------------------------------------------------------
964 std::map< std::streampos, std::streampos , std::less< std::streampos > > m_FreeObjIDPosMap;
965 //---------------------------------------------------------------------
966
967 //============= De- und Konstruktoren
968 //---------------------------------------------------------------------
979 //---------------------------------------------------------------------
980
981 public:
982 //============= De- und Konstruktoren
983 //---------------------------------------------------------------------
999 TableObjIdIndex( const std::string & rsPathName, unsigned long ulClassID );
1000 //---------------------------------------------------------------------
1013 //---------------------------------------------------------------------
1024 //---------------------------------------------------------------------
1025
1026 //============== Methoden
1027 //---------------------------------------------------------------------
1040 const std::string & getPathName() const;
1041 //---------------------------------------------------------------------
1054 unsigned long getClassID() const;
1055 //---------------------------------------------------------------------
1069 const std::map< ObjID, IndexPool::ObjIdPosTuple *, std::less< ObjID > > & getObjIDIndexMapRef() const;
1070 //---------------------------------------------------------------------
1084 const std::map< std::streampos, std::streampos , std::less< std::streampos > > & getFreeObjIDPosMapRef() const;
1085 //---------------------------------------------------------------------
1099 bool isObjIdFree( const ObjID & rObjID ) const;
1100 //---------------------------------------------------------------------
1120 int insertObjIdPosTuple( const ObjIdPosTuple & rIndexTuple );
1121 //---------------------------------------------------------------------
1139 int removeObjId( const ObjID & rObjID );
1140 //---------------------------------------------------------------------
1168 const ObjID & rObjID ) const;
1169 //---------------------------------------------------------------------
1185 int insertFreeObjIDPos( std::streampos Pos );
1186 //---------------------------------------------------------------------
1203 int getFreeObjIDPos( std::streampos & rPos ) const;
1204 //---------------------------------------------------------------------
1220 int removeFreeObjIDPos( std::streampos Pos );
1221 //---------------------------------------------------------------------
1234 //---------------------------------------------------------------------
1248 //---------------------------------------------------------------------
1249
1250 protected:
1251 //============== Methoden
1252 //---------------------------------------------------------------------
1271 void copyMapFrom( const TableObjIdIndex & rT );
1272 //---------------------------------------------------------------------
1273
1274 public:
1275 //============== Operatoren
1276 //---------------------------------------------------------------------
1289 //---------------------------------------------------------------------
1290 };
1291 //-----------------------------------------------------------------------
1292 // <<<<<<<<<<<<<<<<<<<<<<<< TableObjIdIndex <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
1293 //-----------------------------------------------------------------------
1294
1295 //-----------------------------------------------------------------------
1296 // >>>>>>>>>>>>>>>>>>>> TableObjIdIndexIterator >>>>>>>>>>>>>>>>>>>>>>>>>>>
1297 //-----------------------------------------------------------------------
1315 {
1316 private:
1317 //============== Attribute
1318 //---------------------------------------------------------------------
1331 //---------------------------------------------------------------------
1347 //---------------------------------------------------------------------
1362 //---------------------------------------------------------------------
1363
1364 protected:
1365 //============= De- und Konstruktoren
1366 //---------------------------------------------------------------------
1377 //---------------------------------------------------------------------
1378
1379 public:
1380 //============= De- und Konstruktoren
1381 //---------------------------------------------------------------------
1398 //---------------------------------------------------------------------
1411 //---------------------------------------------------------------------
1422 //---------------------------------------------------------------------
1423
1424 //============== Methoden
1425 //---------------------------------------------------------------------
1439 void setWithSubClasses( bool bWithSubClasses );
1440 //---------------------------------------------------------------------
1454 bool withSubClasses() const;
1455 //---------------------------------------------------------------------
1469 std::size_t getTableObjIdIndexSize() const;
1470 //---------------------------------------------------------------------
1482 unsigned long getClassID() const;
1483 //---------------------------------------------------------------------
1524 int getObjIdPosTuple( ObjIdPosTuple *& prRetVal, EnSeekMode eMode );
1525 //---------------------------------------------------------------------
1542 int setPosition( std::size_t nPosition );
1543 //---------------------------------------------------------------------
1560 int setCurrentObject( const ObjID & rObjID );
1561 //---------------------------------------------------------------------
1581 bool setNearestObject( const ObjID & rObjID );
1582 //---------------------------------------------------------------------
1599 bool inObjIdIndex( const ObjID & rObjID );
1600 //---------------------------------------------------------------------
1601
1602 protected:
1603 //============== Methoden
1604 //---------------------------------------------------------------------
1639 bool setNearestObject( std::map< ObjID, ObjIdPosTuple *>::iterator & rIterator,
1640 const ObjID & rObjID );
1641 //---------------------------------------------------------------------
1642
1643 public:
1644 //============== Operatoren
1645 //---------------------------------------------------------------------
1658 //---------------------------------------------------------------------
1659 };
1660 //-----------------------------------------------------------------------
1661 // <<<<<<<<<<<<<<<<<<<< TableObjIdIndexIterator <<<<<<<<<<<<<<<<<<<<<<<<<<<
1662 //-----------------------------------------------------------------------
1663
1664 //-----------------------------------------------------------------------
1665 // >>>>>>>>>>>>>>>>>>>>>>> ObjectStrIndex >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1666 //-----------------------------------------------------------------------
1686 {
1687 //============== Friends
1688 //-----------------------------------------------------------------------
1689 friend class RealIndexPool;
1690 //-----------------------------------------------------------------------
1691
1692 private:
1693 //============== Attribute
1694 //---------------------------------------------------------------------
1706 std::string m_strPathName;
1707 //---------------------------------------------------------------------
1719 unsigned long m_ulClassID;
1720 //---------------------------------------------------------------------
1732 std::string m_sIndexName;
1733 //---------------------------------------------------------------------
1747 //---------------------------------------------------------------------
1757 std::map< std::string, ObjStrIdTuple * , std::less< std::string > > m_UniqueIndexMap;
1758 //---------------------------------------------------------------------
1768 std::map< std::string, ObjStrIdTuple * >::iterator m_UniqueIndexMapIterator;
1769 //---------------------------------------------------------------------
1796 std::multimap< std::string, ObjStrIdTuple * , std::less< std::string > > m_ReservedIndexMultiMap;
1797 //---------------------------------------------------------------------
1807 std::multimap< std::string, ObjStrIdTuple * , std::less< std::string > > m_NonUniqueIndexMultiMap;
1808 //---------------------------------------------------------------------
1818 std::multimap< std::string, ObjStrIdTuple * >::iterator m_NonUniqueIndexMultiMapIterator;
1819 //---------------------------------------------------------------------
1831 std::map< ObjID, ObjStrIdTuple * , std::less< ObjID > > m_ObjIdIndexMap;
1832 //---------------------------------------------------------------------
1833
1834 protected:
1835 //============= De- und Konstruktoren
1836 //---------------------------------------------------------------------
1847 //---------------------------------------------------------------------
1848
1849 public:
1850 //============= De- und Konstruktoren
1851 //---------------------------------------------------------------------
1877 ObjectStrIndex( const std::string & rsPathName,
1878 unsigned long ulClassID,
1879 const std::string & rsIndexName,
1880 bool bUnique );
1881 //---------------------------------------------------------------------
1896 //---------------------------------------------------------------------
1907 //---------------------------------------------------------------------
1908
1909 //============== Methoden
1910 //---------------------------------------------------------------------
1923 const std::string & getPathName() const;
1924 //---------------------------------------------------------------------
1936 unsigned long getClassID() const;
1937 //---------------------------------------------------------------------
1951 const std::string & getIndexName() const;
1952 //---------------------------------------------------------------------
1967 bool isUnique() const;
1968 //---------------------------------------------------------------------
1980 const std::map< std::string, IndexPool::ObjStrIdTuple * , std::less< std::string > > & getUniqueIndexMapRef() const;
1981 //---------------------------------------------------------------------
1993 const std::multimap< std::string, IndexPool::ObjStrIdTuple * , std::less< std::string > > & getNonUniqueIndexMapRef() const;
1994 //---------------------------------------------------------------------
2006 const std::map< ObjID, IndexPool::ObjStrIdTuple * , std::less< ObjID > > & getObjIdIndexMapRef() const;
2007 //---------------------------------------------------------------------
2026 void reserveObjStrIdTuple( const ObjStrIdTuple & rIndexTuple );
2027 //---------------------------------------------------------------------
2051 void releaseObjStrIdTuple( const NUM_PTR ipReservingComunicatorTrx );
2052 //---------------------------------------------------------------------
2074 int insertObjStrIdTuple( const ObjStrIdTuple & rIndexTuple );
2075 //---------------------------------------------------------------------
2099 int removeObjStrIdTuple( const ObjID & rObjID,
2100 NUM_PTR ipReservingComunicatorTrx = 0 );
2101 //---------------------------------------------------------------------
2121 bool isIndexFree( const std::string & rsIndex, const ObjID & rObjID ) const;
2122 //---------------------------------------------------------------------
2138 bool isObjIdAlreadyAvailable( const ObjID & rObjID ) const;
2139 //---------------------------------------------------------------------
2155 //---------------------------------------------------------------------
2156
2157 protected:
2158 //============== Methoden
2159 //---------------------------------------------------------------------
2181 //---------------------------------------------------------------------
2220 //---------------------------------------------------------------------
2252 int removeObjStrIdTuple( const ObjID & rObjID,
2253 bool bDelete,
2254 NUM_PTR ipReservingComunicatorTrx = 0 );
2255 //---------------------------------------------------------------------
2273 void copyMapsFrom( const ObjectStrIndex & rT );
2274 //---------------------------------------------------------------------
2275
2276 public:
2277 //============== Operatoren
2278 //---------------------------------------------------------------------
2292 IndexPool::ObjectStrIndex & operator= ( const ObjectStrIndex & rT );
2293 //---------------------------------------------------------------------
2294 };
2295 //-----------------------------------------------------------------------
2296 // <<<<<<<<<<<<<<<<<<<<<<<< ObjectStrIndex <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2297 //-----------------------------------------------------------------------
2298
2299 //-----------------------------------------------------------------------
2300 // >>>>>>>>>>>>>>>>>>>>>>>>>>> IndexFilter >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2301 //-----------------------------------------------------------------------
2319 {
2320 //-----------------------------------------------------------------------
2333 //-----------------------------------------------------------------------
2343 virtual ~IndexFilter() {};
2344 //-----------------------------------------------------------------------
2345 };
2346 //-----------------------------------------------------------------------
2347 // <<<<<<<<<<<<<<<<<<<<<<<<<<< IndexFilter <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2348 //-----------------------------------------------------------------------
2349
2350 //-----------------------------------------------------------------------
2351 // >>>>>>>>>>>>>>>>>>>>>> IndexComparisionFilter >>>>>>>>>>>>>>>>>>>>>>>>>>
2352 //-----------------------------------------------------------------------
2376 {
2377 //-----------------------------------------------------------------------
2388 //-----------------------------------------------------------------------
2399 : m_eComparisionOperator( EQUAL )
2400 {};
2401 //-----------------------------------------------------------------------
2412 //-----------------------------------------------------------------------
2413 };
2414 //-----------------------------------------------------------------------
2415 // <<<<<<<<<<<<<<<<<<<<<< IndexComparisionFilter <<<<<<<<<<<<<<<<<<<<<<<<<<
2416 //-----------------------------------------------------------------------
2417
2418 //-----------------------------------------------------------------------
2419 // >>>>>>>>>>>>>>>>>>>>>>>>> IndexRangeFilter >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2420 //-----------------------------------------------------------------------
2448 {
2449 //-----------------------------------------------------------------------
2460 //-----------------------------------------------------------------------
2470 virtual ~IndexRangeFilter() {};
2471 //-----------------------------------------------------------------------
2472 };
2473 //-----------------------------------------------------------------------
2474 // <<<<<<<<<<<<<<<<<<<<<<<<< IndexRangeFilter <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2475 //-----------------------------------------------------------------------
2476
2477 //-----------------------------------------------------------------------
2478 // >>>>>>>>>>>>>>>>>>>>> ObjectStrIndexIterator >>>>>>>>>>>>>>>>>>>>>>>>>>>
2479 //-----------------------------------------------------------------------
2497 {
2498 private:
2499 //============== Attribute
2500 //---------------------------------------------------------------------
2515 //---------------------------------------------------------------------
2531 //---------------------------------------------------------------------
2542 //---------------------------------------------------------------------
2543
2544 protected:
2545 //============= De- und Konstruktoren
2546 //---------------------------------------------------------------------
2557 //---------------------------------------------------------------------
2558
2559 public:
2560 //============= De- und Konstruktoren
2561 //---------------------------------------------------------------------
2578 //---------------------------------------------------------------------
2591 //---------------------------------------------------------------------
2602 //---------------------------------------------------------------------
2603
2604 //============== Methoden
2605 //---------------------------------------------------------------------
2619 std::size_t getObjectStrIndexSize() const;
2620 //---------------------------------------------------------------------
2632 unsigned long getClassID() const;
2633 //---------------------------------------------------------------------
2672 //---------------------------------------------------------------------
2700 int getObjStrIdTupleList( std::list<ObjStrIdTuple> & rRetVal,
2701 const std::string & rsIndex,
2702 EnQueryType eQuerryType ) const;
2703 //---------------------------------------------------------------------
2731 int getObjStrIdTupleList( std::list<ObjStrIdTuple> & rRetVal,
2732 const std::string & rsIndex,
2733 EnComparisionOp eComparisionOp ) const;
2734 //---------------------------------------------------------------------
2764 int getObjStrIdTupleList( std::list<ObjStrIdTuple> & rRetVal,
2765 const std::string & rsRangeStartIndex,
2766 const std::string & rsRangeEndIndex ) const;
2767 //---------------------------------------------------------------------
2792 void setFilter( const std::string & rsIndexFilterValue );
2793 //---------------------------------------------------------------------
2826 void setFilter( const std::string & rsIndexFilterValue,
2827 EnComparisionOp eComparisionOp );
2828 //---------------------------------------------------------------------
2859 void setFilter( const std::string & rsRangeStartIndex,
2860 const std::string & rsRangeEndIndex );
2861 //---------------------------------------------------------------------
2874 //---------------------------------------------------------------------
2893 void setFilter( IndexFilter * pIndexFilter );
2894 //---------------------------------------------------------------------
2911 int setPosition( std::size_t nPosition );
2912 //---------------------------------------------------------------------
2929 int setCurrentObject( const ObjID & rObjID );
2930 //---------------------------------------------------------------------
2950 bool setNearestObject( const std::string & rsIndex );
2951 //---------------------------------------------------------------------
2969 bool inObjectStrIndex( const ObjID & rObjID );
2970 //---------------------------------------------------------------------
2988 bool inObjectStrIndex( const std::string & rsIndex );
2989 //---------------------------------------------------------------------
2990
2991 protected:
2992 //============== Methoden
2993 //---------------------------------------------------------------------
3009 bool valueMatchesIndexFilter( const std::string & rsSearchIndex,
3010 IndexFilter & rIndexFilter ) const;
3011 //---------------------------------------------------------------------
3027 bool valueMatchesComparisonFilter( const std::string & rsSearchIndex,
3028 IndexComparisionFilter & rIndexComparisionFilter ) const;
3029 //---------------------------------------------------------------------
3045 bool valueMatchesRangeFilter( const std::string & rsSearchIndex,
3046 IndexRangeFilter & rIndexRangeFilter ) const;
3047 //---------------------------------------------------------------------
3080 int getSearchModeAndSearchIndex( std::string & rsSearchIndex,
3081 const std::string rsSourceIndex ) const;
3082 //---------------------------------------------------------------------
3115 bool setNearestObjectInMap( std::map< std::string, ObjStrIdTuple *>::const_iterator & rIterator,
3116 const std::string & rsIndex );
3117 //---------------------------------------------------------------------
3150 bool setNearestObjectInMultiMap( std::multimap< std::string, ObjStrIdTuple *>::const_iterator & rIterator,
3151 const std::string & rsIndex );
3152 //---------------------------------------------------------------------
3153
3154
3155 public:
3156 //============== Operatoren
3157 //---------------------------------------------------------------------
3170 //---------------------------------------------------------------------
3171 };
3172 //-----------------------------------------------------------------------
3173 // <<<<<<<<<<<<<<<<<<<<< ObjectStrIndexIterator <<<<<<<<<<<<<<<<<<<<<<<<<<<
3174 //-----------------------------------------------------------------------
3175
3176 //-----------------------------------------------------------------------
3177 // >>>>>>>>>>>>>>>>>>>>>>>>> SchemaIndex >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
3178 //-----------------------------------------------------------------------
3192 {
3193 private:
3194 //============== Attribute
3195 //---------------------------------------------------------------------
3205 std::string m_sSchemaName;
3206 //---------------------------------------------------------------------
3220 std::map< unsigned long, TableObjIdIndex * , std::less< unsigned long > > m_TableObjIdIndexMap;
3221 //---------------------------------------------------------------------
3235 std::multimap< unsigned long, ObjectStrIndex * , std::less< unsigned long > > m_ObjectStrIndexMap;
3236 //---------------------------------------------------------------------
3250 std::map< ObjID, ObjID * , std::less< ObjID > > m_DeletedObjIdMap;
3251 //---------------------------------------------------------------------
3274 std::map< ObjID, DeletedObjIdTuple * , std::less< ObjID > > m_TransactionDeletedObjIdMap;
3275 //---------------------------------------------------------------------
3276
3277 protected:
3278 //============= De- und Konstruktoren
3279 //---------------------------------------------------------------------
3290 //---------------------------------------------------------------------
3291
3292 public:
3293 //============= De- und Konstruktoren
3294 //---------------------------------------------------------------------
3306 SchemaIndex( const std::string & rstrName );
3307 //---------------------------------------------------------------------
3322 //---------------------------------------------------------------------
3333 //---------------------------------------------------------------------
3334
3335 //============== Methoden
3336 //---------------------------------------------------------------------
3348 std::string getSchemaName() const;
3349 //---------------------------------------------------------------------
3361 const std::map< unsigned long, IndexPool::TableObjIdIndex * , std::less< unsigned long > > & getTableObjIdIndexMapRef() const;
3362 //---------------------------------------------------------------------
3383 unsigned long ulClassID ) const;
3384 //---------------------------------------------------------------------
3402 int makeTableObjIdIndex( const std::string & rsPathName,
3403 unsigned long ulClassID );
3404 //---------------------------------------------------------------------
3425 unsigned long ulClassID ) const;
3426 //---------------------------------------------------------------------
3442 int removeTableObjIdIndex( unsigned long ulClassID );
3443 //---------------------------------------------------------------------
3462 int isObjIdFree( unsigned long ulClassID,
3463 const ObjID & rObjID ) const;
3464 //---------------------------------------------------------------------
3482 bool isObjIdDeleted (const ObjID & rObjID) const;
3483 //---------------------------------------------------------------------
3505 int insertObjIdPosTuple( unsigned long ulClassID,
3506 const ObjIdPosTuple & rIndexTuple );
3507 //---------------------------------------------------------------------
3521 int insertDeletedObjID( const ObjID & rDeletedObjId );
3522 //---------------------------------------------------------------------
3541 int insertTransactionDeletedObjID( const ObjID & rDeletedObjId );
3542 //---------------------------------------------------------------------
3563 int removeTransactionDeletedObjID( const ObjID & rDeletedObjId );
3564 //---------------------------------------------------------------------
3585 int removeObjId( unsigned long ulClassID, const ObjID & rObjID );
3586 //---------------------------------------------------------------------
3612 unsigned long ulClassID,
3613 const ObjID & rObjID ) const;
3614 //---------------------------------------------------------------------
3632 int insertFreeObjIDPos( unsigned long ulClassID, std::streampos Pos );
3633 //---------------------------------------------------------------------
3651 int getFreeObjIDPos( std::streampos & rPos, unsigned long ulClassID ) const;
3652 //---------------------------------------------------------------------
3671 int removeFreeObjIDPos( unsigned long ulClassID, std::streampos Pos );
3672 //---------------------------------------------------------------------
3684 const std::multimap< unsigned long, IndexPool::ObjectStrIndex * , std::less< unsigned long > > & getObjectStrIndexMapRef() const;
3685 //---------------------------------------------------------------------
3712 int getObjectStrIndexIterator( ObjectStrIndexIterator *& prObjectStrIndexIterators,
3713 unsigned long ulClassID,
3714 const std::string & rsIndexName ) const;
3715 //---------------------------------------------------------------------
3743 int makeObjectStrIndex( const std::string & rsPathName,
3744 unsigned long ulClassID,
3745 const std::string & rsIndexName,
3746 bool bUnique );
3747 //---------------------------------------------------------------------
3774 unsigned long ulClassID,
3775 const std::string & rsIndexName );
3776 //---------------------------------------------------------------------
3799 int removeObjectStrIndex( unsigned long ulClassID,
3800 const std::string & rsIndexName );
3801 //---------------------------------------------------------------------
3830 int isIndexFree( unsigned long ulClassID,
3831 const ObjID & rObjID,
3832 const std::string & rsIndexName,
3833 const std::string & rsIndex ) const;
3834 //---------------------------------------------------------------------
3863 int reserveObjStrIdTuple( unsigned long ulClassID,
3864 const std::string & rsIndexName,
3865 const ObjStrIdTuple & rIndexTuple );
3866 //---------------------------------------------------------------------
3897 int releaseObjStrIdTuple( unsigned long ulClassID,
3898 const std::string & rsIndexName,
3899 const NUM_PTR ipReservingComunicatorTrx );
3900 //---------------------------------------------------------------------
3924 int insertObjStrIdTuple( unsigned long ulClassID,
3925 const std::string & rsIndexName,
3926 const ObjStrIdTuple & rIndexTuple );
3927 //---------------------------------------------------------------------
3960 int removeObjStrIdTuple( unsigned long ulClassID,
3961 const std::string & rsIndexName,
3962 const ObjID & rObjID,
3963 NUM_PTR ipReservingComunicatorTrx = 0 );
3964 //---------------------------------------------------------------------
3965
3966 protected:
3967 //---------------------------------------------------------------------
3983 void copyMapsFrom( const SchemaIndex & rT );
3984 //---------------------------------------------------------------------
3995 //---------------------------------------------------------------------
3996
3997 public:
3998 //============== Operatoren
3999 //---------------------------------------------------------------------
4011 IndexPool::SchemaIndex & operator= ( const SchemaIndex & rT );
4012 //---------------------------------------------------------------------
4013 };
4014 //-----------------------------------------------------------------------
4015 // <<<<<<<<<<<<<<<<<<<<<<<<< SchemaIndex <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
4016 //-----------------------------------------------------------------------
4017
4018 // ============================================================================
4019 //---------------------------- IndexPool --------------------------------------
4020 protected:
4021 //============== Attribute
4022 //-----------------------------------------------------------------------
4035 #if defined (__PTHREADS)
4036 EuPCriticalSection m_LocalCriticalSection;
4037 #else
4039 #endif
4040 //-----------------------------------------------------------------------
4050 std::map< std::string, SchemaIndex * , std::less< std::string > > m_SchemaIndexMap;
4051 //-----------------------------------------------------------------------
4052
4053 public:
4054 //============== De- und Konstruktor
4055 //-----------------------------------------------------------------------
4066 //-----------------------------------------------------------------------
4078 IndexPool( const IndexPool & rT );
4079 //-----------------------------------------------------------------------
4089 virtual ~IndexPool();
4090 //-----------------------------------------------------------------------
4091
4092 //============== Methoden
4093 //-----------------------------------------------------------------------
4122 virtual int getTableObjIdIndexIterator( TableObjIdIndexIterator *& prTableIterators,
4123 const std::string & rsSchemaName,
4124 unsigned long ulClassID ) const;
4125 //-----------------------------------------------------------------------
4151 virtual int isObjIdFree( const std::string & rsSchemaName,
4152 const ObjID & rObjID ) const;
4153 //-----------------------------------------------------------------------
4175 virtual int insertDeletedObjID( const std::string & rsSchemaName,
4176 const ObjID & rDeletedObjId );
4177 //-----------------------------------------------------------------------
4202 virtual bool isObjIdDeleted( const std::string & rsSchemaName,
4203 const ObjID & rObjID ) const;
4204 //-----------------------------------------------------------------------
4236 virtual int insertObjIdPosTuple( const std::string & rsSchemaName,
4237 unsigned long ulClassID,
4238 const ObjIdPosTuple & rIndexTuple );
4239 //-----------------------------------------------------------------------
4274 virtual int getObjIdPosTuple( ObjIdPosTuple *& prRetVal,
4275 const std::string & rsSchemaName,
4276 unsigned long ulClassID,
4277 const ObjID & rObjID ) const;
4278 //-----------------------------------------------------------------------
4309 virtual int removeObjId( const std::string & rsSchemaName,
4310 unsigned long ulClassID,
4311 const ObjID & rObjID );
4312 //-----------------------------------------------------------------------
4346 virtual int getObjectStrIndexIterator( ObjectStrIndexIterator *& prObjectStrIndexIterators,
4347 const std::string & rsSchemaName,
4348 unsigned long ulClassID,
4349 const std::string & rsIndexName ) const;
4350 //-----------------------------------------------------------------------
4388 virtual int isIndexFree( const std::string & rsSchemaName,
4389 unsigned long ulClassID,
4390 const ObjID & rObjID,
4391 const std::string & rsIndexName,
4392 const std::string & rsIndex ) const;
4393 //-----------------------------------------------------------------------
4430 int reserveObjStrIdTuple( const std::string & rsSchemaName,
4431 unsigned long ulClassID,
4432 const std::string & rsIndexName,
4433 const ObjStrIdTuple & rIndexTuple );
4434 //-----------------------------------------------------------------------
4472 int releaseObjStrIdTuple( const std::string & rsSchemaName,
4473 unsigned long ulClassID,
4474 const std::string & rsIndexName,
4475 const NUM_PTR ipReservingComunicatorTrx );
4476 //-----------------------------------------------------------------------
4510 virtual int insertObjStrIdTuple( const std::string & rsSchemaName,
4511 unsigned long ulClassID,
4512 const std::string & rsIndexName,
4513 const ObjStrIdTuple & rIndexTuple );
4514 //-----------------------------------------------------------------------
4557 virtual int removeObjStrIdTuple( const std::string & rsSchemaName,
4558 unsigned long ulClassID,
4559 const std::string & rsIndexName,
4560 const ObjID & rObjID,
4561 NUM_PTR ipReservingComunicatorTrx = 0 );
4562 //-----------------------------------------------------------------------
4577 //-----------------------------------------------------------------------
4578
4579 protected:
4580 //============== Methoden
4581 //-----------------------------------------------------------------------
4603 void copyMapFrom( const IndexPool & rT );
4604 //-----------------------------------------------------------------------
4620 int _removeSchemaIndex( const std::string & rsSchemaName );
4621 //-----------------------------------------------------------------------
4640 virtual bool _existsSchemaIndex( const std::string & rsSchemaName ) const;
4641 //-----------------------------------------------------------------------
4664 virtual int _getSchemaIndex( SchemaIndex *& prRetVal,
4665 const std::string & rsSchemaName ) const;
4666 //-----------------------------------------------------------------------
4692 const std::string & rsSchemaName,
4693 unsigned long ulClassID ) const;
4694 //-----------------------------------------------------------------------
4719 virtual int _makeTableObjIdIndex( const std::string & rsSchemaName,
4720 const std::string & rsTablePathName,
4721 unsigned long ulClassID );
4722 //-----------------------------------------------------------------------
4747 virtual int _getTableObjIdIndex( TableObjIdIndex *& prRetVal,
4748 const std::string & rsSchemaName,
4749 unsigned long ulClassID ) const;
4750 //-----------------------------------------------------------------------
4779 virtual int _getObjectStrIndexIterator( ObjectStrIndexIterator *& prObjStrIterators,
4780 const std::string & rsSchemaName,
4781 unsigned long ulClassID,
4782 const std::string & rsIndexName ) const;
4783 //-----------------------------------------------------------------------
4817 virtual int _makeObjectStrIndex( const std::string & rsSchemaName,
4818 const std::string & rsTablePathName,
4819 unsigned long ulClassID,
4820 const std::string & rsIndexName,
4821 bool bUnique );
4822 //-----------------------------------------------------------------------
4852 virtual int _getObjectStrIndex( ObjectStrIndex *& prRetVal,
4853 const std::string & rsSchemaName,
4854 unsigned long ulClassID,
4855 const std::string & rsIndexName ) const;
4856 //-----------------------------------------------------------------------
4880 virtual int _isObjIdFree( const std::string & rsSchemaName,
4881 unsigned long ulClassID,
4882 const ObjID & rObjID ) const;
4883 //-----------------------------------------------------------------------
4901 virtual int _insertDeletedObjID( const std::string & rsSchemaName,
4902 const ObjID & rDeletedObjId );
4903 //-----------------------------------------------------------------------
4923 virtual bool _isObjIdDeleted( const std::string & rsSchemaName,
4924 const ObjID & rObjID ) const;
4925 //-----------------------------------------------------------------------
4953 virtual int _insertObjIdPosTuple( const std::string & rsSchemaName,
4954 unsigned long ulClassID,
4955 const ObjIdPosTuple & rIndexTuple );
4956 //-----------------------------------------------------------------------
4986 virtual int _insertObjStrIdTuple( const std::string & rsSchemaName,
4987 unsigned long ulClassID,
4988 const std::string & rsIndexName,
4989 const ObjStrIdTuple & rIndexTuple );
4990 //-----------------------------------------------------------------------
5021 virtual int _getObjIdPosTuple( ObjIdPosTuple *& prRetVal,
5022 const std::string & rsSchemaName,
5023 unsigned long ulClassID,
5024 const ObjID & rObjID ) const;
5025 //-----------------------------------------------------------------------
5048 virtual int _insertFreeObjIDPos( const std::string & rsSchemaName,
5049 unsigned long ulClassID,
5050 std::streampos Pos );
5051 //-----------------------------------------------------------------------
5075 virtual int _getFreeObjIDPos( std::streampos & rPos,
5076 const std::string & rsSchemaName,
5077 unsigned long ulClassID ) const;
5078 //-----------------------------------------------------------------------
5101 virtual int _removeFreeObjIDPos( const std::string & rsSchemaName,
5102 unsigned long ulClassID,
5103 std::streampos Pos );
5104 //-----------------------------------------------------------------------
5115 //-----------------------------------------------------------------------
5116
5117 public:
5118 //============== Operatoren
5119 //-----------------------------------------------------------------------
5131 IndexPool & operator= ( const IndexPool & rT );
5132 //-----------------------------------------------------------------------
5133 };
5134
5135 // ============================================================================
5151 {
5152 private:
5153 //============== Attribute
5154 //-----------------------------------------------------------------------
5167 //-----------------------------------------------------------------------
5180 //-----------------------------------------------------------------------
5181
5182 public:
5183 //============== De- und Konstruktor
5184 //-----------------------------------------------------------------------
5195 //-----------------------------------------------------------------------
5208 //-----------------------------------------------------------------------
5219 //-----------------------------------------------------------------------
5220
5221 //============== Methoden
5222 //-----------------------------------------------------------------------
5241 std::size_t getNumberOfClassInfos( const SchemaInterface & rSchemaInterface ) const;
5242 //-----------------------------------------------------------------------
5258 std::size_t getNumberOfIndexes( const SchemaInterface & rSchemaInterface ) const;
5259 //-----------------------------------------------------------------------
5277 void setWatchNotifyManager( WatchNotifyManager * pWatchNotifyManager );
5278 //-----------------------------------------------------------------------
5298 int removeSchemaIndex( const std::string & rsSchemaName );
5299 //-----------------------------------------------------------------------
5317 int readIndexes( const SchemaInterface & rSchemaInterface );
5318 //-----------------------------------------------------------------------
5336 int reindex( const SchemaInterface & rSchemaInterface );
5337 //-----------------------------------------------------------------------
5359 int reindex( const SchemaInterface & rSchemaInterface, int iActions );
5360 //-----------------------------------------------------------------------
5380 int writeIndexes( const SchemaInterface & rSchemaInterface );
5381 //-----------------------------------------------------------------------
5405 int writeIndexes( const SchemaInterface & rSchemaInterface, int iActions );
5406 //-----------------------------------------------------------------------
5425 int reindexObjIDIndexes( const SchemaInterface & rSchemaInterface );
5426 //-----------------------------------------------------------------------
5445 int reindexObjStrIndexes( const SchemaInterface & rSchemaInterface );
5446 //-----------------------------------------------------------------------
5466 int writeObjIDIndexes( const SchemaInterface & rSchemaInterface ) const;
5467 //-----------------------------------------------------------------------
5487 int writeObjStrIndexes( const SchemaInterface & rSchemaInterface ) const;
5488 //-----------------------------------------------------------------------
5509 virtual bool existsSchemaIndex( const std::string & rsSchemaName ) const;
5510 //-----------------------------------------------------------------------
5537 virtual int insertFreeObjIDPos( const std::string & rsSchemaName,
5538 unsigned long ulClassID,
5539 std::streampos Pos );
5540 //-----------------------------------------------------------------------
5568 virtual int getFreeObjIDPos( std::streampos & rPos,
5569 const std::string & rsSchemaName,
5570 unsigned long ulClassID ) const;
5571 //-----------------------------------------------------------------------
5598 virtual int removeFreeObjIDPos( const std::string & rsSchemaName,
5599 unsigned long ulClassID,
5600 std::streampos Pos );
5601 //-----------------------------------------------------------------------
5628 const std::string & rsSchemaName,
5629 const ObjID & rObjID,
5630 int iFraction,
5631 int iActions );
5632 //-----------------------------------------------------------------------
5633
5634 protected:
5635 //============== Methoden
5636 //-----------------------------------------------------------------------
5651 int _reindexObjIDIndexes( const SchemaInterface & rSchemaInterface );
5652 //-----------------------------------------------------------------------
5667 int _reindexObjStrIndexes( const SchemaInterface & rSchemaInterface );
5668 //-----------------------------------------------------------------------
5684 int _writeObjIDIndexes( const SchemaInterface & rSchemaInterface ) const;
5685 //-----------------------------------------------------------------------
5701 int _writeObjStrIndexes( const SchemaInterface & rSchemaInterface ) const;
5702 //-----------------------------------------------------------------------
5719 int _writeObjIDIndexes( const SchemaIndex & rSchemaIndex ) const;
5720 //-----------------------------------------------------------------------
5737 int _writeObjStrIndexes( const SchemaIndex & rSchemaIndex ) const;
5738 //-----------------------------------------------------------------------
5762 int _readObjIDIndexes( const SchemaInterface & rSchemaInterface );
5763 //-----------------------------------------------------------------------
5787 int _readObjStrIndexes( const SchemaInterface & rSchemaInterface );
5788 //-----------------------------------------------------------------------
5804 int _createObjIDIndexFromTable( const SchemaInterface & rSchemaInterface,
5805 const ClassInfoAttribute & rClassInfoAttribute );
5806 //-----------------------------------------------------------------------
5822 int _createObjStrIndexFromTables( const SchemaInterface & rSchemaInterface,
5823 const ClassInfoIndex & rClassInfoIndex );
5824 //-----------------------------------------------------------------------
5879 int _getIndexString( std::string & rsRetValIndex,
5880 const std::vector< eut::LanguageFunctions::EnLanguageKey > & rLanguageKeys,
5881 bool bCaseSensitive,
5882 const SchemaInterface & rSchemaInterface,
5883 unsigned long ulClassID,
5884 const ObjID & rObjID,
5885 const ClassInfoIndex::IndexAttributeItem & rIndexAttributeItem );
5886 //-----------------------------------------------------------------------
5887
5888 public:
5889 //============== Operatoren
5890 //-----------------------------------------------------------------------
5902 RealIndexPool & operator= ( const RealIndexPool & rT );
5903 //-----------------------------------------------------------------------
5904 };
5905
5906 // ============================================================================
5924 {
5925 public:
5926 //============== De- und Konstruktor
5927 //-----------------------------------------------------------------------
5938 //-----------------------------------------------------------------------
5940
5954 //-----------------------------------------------------------------------
5965 //-----------------------------------------------------------------------
5966
5967 //============== Methoden
5968 //-----------------------------------------------------------------------
5994 int insertTransactionDeletedObjID( const std::string & rsSchemaName,
5995 const ObjID & rDeletedObjId );
5996 //-----------------------------------------------------------------------
6022 int removeTransactionDeletedObjID( const std::string & rsSchemaName,
6023 const ObjID & rDeletedObjId );
6024 //-----------------------------------------------------------------------
6025
6026 public:
6027 //============== Operatoren
6028 //-----------------------------------------------------------------------
6030
6044 //-----------------------------------------------------------------------
6045 };
6046 // ============================================================================
6047 #ifdef _MSC_VER
6048 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
6049 #pragma warning( default : 4251 )
6050 #endif
6051 //---------------------------------------------------------------------------
6052} // namespace glo
6053#endif
Header für CriticalSection
long long NUM_PTR
Definition EuDef_NULL_PTR.h:93
Header für EuPCriticalSection
Header für ClassInfoAttribute und ClassInfoAttribute::Type
Header für ClassInfoIndex und ClassInfoIndex::IndexAttributeItem
Header für ObjID
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:63
Header für WatchNotifyManager WatchNotifyManager::NotifyInfo WatchNotifyManager::NotifyObjInfo ...
Ist ein Mutex, welcher über sein Lock-Modus abgefragt werden kann. Siehe isLocked().
Definition EuPCriticalSection.h:89
Ist ein Mutex, welcher über sein Lock-Modus abgefragt werden kann. Siehe isLocked().
Definition EuCriticalSection.h:94
In Objekten dieser Klasse sind die Information für GlobalObjects, wie ein persistentes Klassenattribu...
Definition GloClassInfoAttribute.h:76
Information für den Index aus welcher Klasse welches Attribut mit wie viel Zeichen zum Index gehört.
Definition GloClassInfoIndex.h:104
In Objekten dieser Klasse sind die Information für GlobalObjects, wie ein Index aufgebaut ist.
Definition GloClassInfoIndex.h:78
Klasse um gelöschte Objekte im IndexPool::SchemaIndex zu verwalten.
Definition GloIndexPool.h:224
int m_iDelCounter
Definition GloIndexPool.h:263
ObjID m_ObjID
Definition GloIndexPool.h:237
DeletedObjIdTuple(const DeletedObjIdTuple &rT)
DeletedObjIdTuple(const ObjID &rObjID, int iDelCounter)
Klasse um Objekte im IndexPool::TableObjIdIndex zu verwalten.
Definition GloIndexPool.h:417
ObjIdPosTuple(const ObjIdPosTuple &rT)
std::string toString() const
std::streampos m_FilePosition
Definition GloIndexPool.h:441
ObjID m_ObjID
Definition GloIndexPool.h:430
ObjIdPosTuple(const ObjID &rObjID, std::streampos FilePosition)
Klasse um Objekte im IndexPool::ObjectStrIndex zu verwalten.
Definition GloIndexPool.h:600
ObjID m_ObjID
Definition GloIndexPool.h:632
std::string toString() const
void setValues(const std::string &rsIndex, const ObjID &rObjID, NUM_PTR ipReservingComunicatorTrx=0)
ObjStrIdTuple(const ObjStrIdTuple &rT)
void setIndex(const std::string &rsIndex)
NUM_PTR m_ipReservingComunicatorTrx
Definition GloIndexPool.h:647
void setObjID(const ObjID &rObjID)
NUM_PTR getReservingComunicatorTrx() const
void setReservingComunicatorTrx(NUM_PTR ipReservingComunicatorTrx)
ObjStrIdTuple(const std::string &rsIndex, const ObjID &rObjID, NUM_PTR ipReservingComunicatorTrx=0)
std::string m_sIndex
Definition GloIndexPool.h:621
std::string getIndex() const
Verwaltet die einzelnen String-Indizes einer Klasse. Wenn dieses ein Unique-Index ist,...
Definition GloIndexPool.h:1686
std::map< ObjID, ObjStrIdTuple *, std::less< ObjID > > m_ObjIdIndexMap
Definition GloIndexPool.h:1831
std::multimap< std::string, ObjStrIdTuple * >::iterator m_NonUniqueIndexMultiMapIterator
Definition GloIndexPool.h:1818
std::map< std::string, ObjStrIdTuple * >::iterator m_UniqueIndexMapIterator
Definition GloIndexPool.h:1768
const std::string & getIndexName() const
const std::multimap< std::string, IndexPool::ObjStrIdTuple *, std::less< std::string > > & getNonUniqueIndexMapRef() const
std::map< std::string, ObjStrIdTuple *, std::less< std::string > > m_UniqueIndexMap
Definition GloIndexPool.h:1757
bool isIndexFree(const std::string &rsIndex, const ObjID &rObjID) const
const std::map< ObjID, IndexPool::ObjStrIdTuple *, std::less< ObjID > > & getObjIdIndexMapRef() const
const std::string & getPathName() const
bool isObjIdAlreadyAvailable(const ObjID &rObjID) const
unsigned long getClassID() const
IndexPool::ObjStrIdTuple * getObjStrIdTuple(const ObjID &rObjID)
void copyMapsFrom(const ObjectStrIndex &rT)
std::string m_sIndexName
Definition GloIndexPool.h:1732
std::multimap< std::string, ObjStrIdTuple *, std::less< std::string > > m_ReservedIndexMultiMap
Definition GloIndexPool.h:1796
ObjectStrIndex(const std::string &rsPathName, unsigned long ulClassID, const std::string &rsIndexName, bool bUnique)
std::string m_strPathName
Definition GloIndexPool.h:1706
ObjectStrIndex(const ObjectStrIndex &rT)
std::multimap< std::string, ObjStrIdTuple *, std::less< std::string > > m_NonUniqueIndexMultiMap
Definition GloIndexPool.h:1807
const std::map< std::string, IndexPool::ObjStrIdTuple *, std::less< std::string > > & getUniqueIndexMapRef() const
void releaseObjStrIdTuple(const NUM_PTR ipReservingComunicatorTrx)
int removeObjStrIdTuple(const ObjID &rObjID, bool bDelete, NUM_PTR ipReservingComunicatorTrx=0)
void reserveObjStrIdTuple(const ObjStrIdTuple &rIndexTuple)
int removeObjStrIdTuple(const ObjID &rObjID, NUM_PTR ipReservingComunicatorTrx=0)
unsigned long m_ulClassID
Definition GloIndexPool.h:1719
int insertObjStrIdTuple(const ObjStrIdTuple &rIndexTuple)
IndexPool::ObjStrIdTuple * getObjStrIdTuple(EnSeekMode eMode)
bool m_bUnique
Definition GloIndexPool.h:1746
Hat einen Zeiger auf einen ObjectStrIndex und ermöglicht das iterieren durch diesen Index....
Definition GloIndexPool.h:2497
ObjectStrIndex * m_pObjectStrIndex
Definition GloIndexPool.h:2514
ObjectStrIndexIterator(const ObjectStrIndexIterator &rT)
bool inObjectStrIndex(const ObjID &rObjID)
bool valueMatchesComparisonFilter(const std::string &rsSearchIndex, IndexComparisionFilter &rIndexComparisionFilter) const
bool setNearestObject(const std::string &rsIndex)
void setFilter(IndexFilter *pIndexFilter)
int getSearchModeAndSearchIndex(std::string &rsSearchIndex, const std::string rsSourceIndex) const
bool setNearestObjectInMultiMap(std::multimap< std::string, ObjStrIdTuple * >::const_iterator &rIterator, const std::string &rsIndex)
int getObjStrIdTupleList(std::list< ObjStrIdTuple > &rRetVal, const std::string &rsRangeStartIndex, const std::string &rsRangeEndIndex) const
void setFilter(const std::string &rsIndexFilterValue, EnComparisionOp eComparisionOp)
int getObjStrIdTuple(ObjStrIdTuple &rRetVal, EnSeekMode eMode)
ObjStrIdTuple * m_pLastObjectStrIndexItem
Definition GloIndexPool.h:2530
bool valueMatchesIndexFilter(const std::string &rsSearchIndex, IndexFilter &rIndexFilter) const
int setCurrentObject(const ObjID &rObjID)
void setFilter(const std::string &rsIndexFilterValue)
bool inObjectStrIndex(const std::string &rsIndex)
void setFilter(const std::string &rsRangeStartIndex, const std::string &rsRangeEndIndex)
std::size_t getObjectStrIndexSize() const
bool setNearestObjectInMap(std::map< std::string, ObjStrIdTuple * >::const_iterator &rIterator, const std::string &rsIndex)
int getObjStrIdTupleList(std::list< ObjStrIdTuple > &rRetVal, const std::string &rsIndex, EnQueryType eQuerryType) const
IndexFilter * m_pIndexFilter
Definition GloIndexPool.h:2541
bool valueMatchesRangeFilter(const std::string &rsSearchIndex, IndexRangeFilter &rIndexRangeFilter) const
ObjectStrIndexIterator(ObjectStrIndex *pObjectStrIndex)
int getObjStrIdTupleList(std::list< ObjStrIdTuple > &rRetVal, const std::string &rsIndex, EnComparisionOp eComparisionOp) const
int setPosition(std::size_t nPosition)
Ist die Indexverwalterklasse für ein Schema bzw. eine Datenbank.
Definition GloIndexPool.h:3192
int removeObjStrIdTuple(unsigned long ulClassID, const std::string &rsIndexName, const ObjID &rObjID, NUM_PTR ipReservingComunicatorTrx=0)
int insertObjIdPosTuple(unsigned long ulClassID, const ObjIdPosTuple &rIndexTuple)
bool isObjIdDeleted(const ObjID &rObjID) const
std::multimap< unsigned long, ObjectStrIndex *, std::less< unsigned long > > m_ObjectStrIndexMap
Definition GloIndexPool.h:3235
int getObjectStrIndex(ObjectStrIndex *&prRetVal, unsigned long ulClassID, const std::string &rsIndexName)
int insertTransactionDeletedObjID(const ObjID &rDeletedObjId)
int getObjIdPosTuple(ObjIdPosTuple *&prRetVal, unsigned long ulClassID, const ObjID &rObjID) const
std::string getSchemaName() const
int insertFreeObjIDPos(unsigned long ulClassID, std::streampos Pos)
int removeObjId(unsigned long ulClassID, const ObjID &rObjID)
int reserveObjStrIdTuple(unsigned long ulClassID, const std::string &rsIndexName, const ObjStrIdTuple &rIndexTuple)
int removeObjectStrIndex(unsigned long ulClassID, const std::string &rsIndexName)
int releaseObjStrIdTuple(unsigned long ulClassID, const std::string &rsIndexName, const NUM_PTR ipReservingComunicatorTrx)
int getTableObjIdIndexIterator(TableObjIdIndexIterator *&prTableIterators, unsigned long ulClassID) const
int removeFreeObjIDPos(unsigned long ulClassID, std::streampos Pos)
std::map< unsigned long, TableObjIdIndex *, std::less< unsigned long > > m_TableObjIdIndexMap
Definition GloIndexPool.h:3220
int getFreeObjIDPos(std::streampos &rPos, unsigned long ulClassID) const
int getTableObjIdIndex(TableObjIdIndex *&prRetVal, unsigned long ulClassID) const
void copyMapsFrom(const SchemaIndex &rT)
std::string m_sSchemaName
Definition GloIndexPool.h:3205
int removeTransactionDeletedObjID(const ObjID &rDeletedObjId)
int insertObjStrIdTuple(unsigned long ulClassID, const std::string &rsIndexName, const ObjStrIdTuple &rIndexTuple)
int insertDeletedObjID(const ObjID &rDeletedObjId)
SchemaIndex(const SchemaIndex &rT)
int makeObjectStrIndex(const std::string &rsPathName, unsigned long ulClassID, const std::string &rsIndexName, bool bUnique)
std::map< ObjID, ObjID *, std::less< ObjID > > m_DeletedObjIdMap
Definition GloIndexPool.h:3250
int getObjectStrIndexIterator(ObjectStrIndexIterator *&prObjectStrIndexIterators, unsigned long ulClassID, const std::string &rsIndexName) const
int makeTableObjIdIndex(const std::string &rsPathName, unsigned long ulClassID)
SchemaIndex(const std::string &rstrName)
std::map< ObjID, DeletedObjIdTuple *, std::less< ObjID > > m_TransactionDeletedObjIdMap
Definition GloIndexPool.h:3274
const std::map< unsigned long, IndexPool::TableObjIdIndex *, std::less< unsigned long > > & getTableObjIdIndexMapRef() const
int removeTableObjIdIndex(unsigned long ulClassID)
int isIndexFree(unsigned long ulClassID, const ObjID &rObjID, const std::string &rsIndexName, const std::string &rsIndex) const
const std::multimap< unsigned long, IndexPool::ObjectStrIndex *, std::less< unsigned long > > & getObjectStrIndexMapRef() const
int isObjIdFree(unsigned long ulClassID, const ObjID &rObjID) const
Verwaltet die Objekt-IDs (genutzte wie freigegebene) mit deren Position in den jeweiligen Tabellen.
Definition GloIndexPool.h:911
const std::string & getPathName() const
TableObjIdIndex(const TableObjIdIndex &rT)
int getFreeObjIDPos(std::streampos &rPos) const
std::string m_strPathName
Definition GloIndexPool.h:926
unsigned long m_ulClassID
Definition GloIndexPool.h:939
unsigned long getClassID() const
int insertFreeObjIDPos(std::streampos Pos)
const std::map< ObjID, IndexPool::ObjIdPosTuple *, std::less< ObjID > > & getObjIDIndexMapRef() const
int removeObjId(const ObjID &rObjID)
void copyMapFrom(const TableObjIdIndex &rT)
int getObjIdPosTuple(ObjIdPosTuple *&prRetVal, const ObjID &rObjID) const
std::map< std::streampos, std::streampos, std::less< std::streampos > > m_FreeObjIDPosMap
Definition GloIndexPool.h:964
std::map< ObjID, ObjIdPosTuple *, std::less< ObjID > > m_ObjIDIndexMap
Definition GloIndexPool.h:951
int insertObjIdPosTuple(const ObjIdPosTuple &rIndexTuple)
int removeFreeObjIDPos(std::streampos Pos)
TableObjIdIndex(const std::string &rsPathName, unsigned long ulClassID)
const std::map< std::streampos, std::streampos, std::less< std::streampos > > & getFreeObjIDPosMapRef() const
bool isObjIdFree(const ObjID &rObjID) const
Hat einen Zeiger auf einen TableObjIdIndex und ermöglicht das iterieren durch diesen Index....
Definition GloIndexPool.h:1315
std::size_t getTableObjIdIndexSize() const
TableObjIdIndexIterator(TableObjIdIndex *pTableObjIdIndex)
void setWithSubClasses(bool bWithSubClasses)
ObjIdPosTuple * m_pLastTableObjIdIndexItem
Definition GloIndexPool.h:1346
int setCurrentObject(const ObjID &rObjID)
int setPosition(std::size_t nPosition)
TableObjIdIndexIterator(const TableObjIdIndexIterator &rT)
bool setNearestObject(std::map< ObjID, ObjIdPosTuple * >::iterator &rIterator, const ObjID &rObjID)
bool m_bWithSubClasses
Definition GloIndexPool.h:1361
bool inObjIdIndex(const ObjID &rObjID)
int getObjIdPosTuple(ObjIdPosTuple *&prRetVal, EnSeekMode eMode)
bool setNearestObject(const ObjID &rObjID)
TableObjIdIndex * m_pTableObjIdIndex
Definition GloIndexPool.h:1330
IndexPool ist die Basisklasse für den RealIndexPool und den TransactionIndexPool für die einzelnen Tr...
Definition GloIndexPool.h:192
IndexPool(const IndexPool &rT)
eut::CriticalSection m_LocalCriticalSection
Definition GloIndexPool.h:4038
virtual int _getTableObjIdIndex(TableObjIdIndex *&prRetVal, const std::string &rsSchemaName, unsigned long ulClassID) const
virtual int isIndexFree(const std::string &rsSchemaName, unsigned long ulClassID, const ObjID &rObjID, const std::string &rsIndexName, const std::string &rsIndex) const
virtual bool _existsSchemaIndex(const std::string &rsSchemaName) const
int reserveObjStrIdTuple(const std::string &rsSchemaName, unsigned long ulClassID, const std::string &rsIndexName, const ObjStrIdTuple &rIndexTuple)
virtual int _insertObjIdPosTuple(const std::string &rsSchemaName, unsigned long ulClassID, const ObjIdPosTuple &rIndexTuple)
void copyMapFrom(const IndexPool &rT)
virtual int getObjectStrIndexIterator(ObjectStrIndexIterator *&prObjectStrIndexIterators, const std::string &rsSchemaName, unsigned long ulClassID, const std::string &rsIndexName) const
virtual bool isObjIdDeleted(const std::string &rsSchemaName, const ObjID &rObjID) const
virtual int _insertObjStrIdTuple(const std::string &rsSchemaName, unsigned long ulClassID, const std::string &rsIndexName, const ObjStrIdTuple &rIndexTuple)
virtual int removeObjStrIdTuple(const std::string &rsSchemaName, unsigned long ulClassID, const std::string &rsIndexName, const ObjID &rObjID, NUM_PTR ipReservingComunicatorTrx=0)
virtual int _getObjIdPosTuple(ObjIdPosTuple *&prRetVal, const std::string &rsSchemaName, unsigned long ulClassID, const ObjID &rObjID) const
virtual int _getObjectStrIndexIterator(ObjectStrIndexIterator *&prObjStrIterators, const std::string &rsSchemaName, unsigned long ulClassID, const std::string &rsIndexName) const
virtual int getObjIdPosTuple(ObjIdPosTuple *&prRetVal, const std::string &rsSchemaName, unsigned long ulClassID, const ObjID &rObjID) const
virtual int insertDeletedObjID(const std::string &rsSchemaName, const ObjID &rDeletedObjId)
virtual int _makeObjectStrIndex(const std::string &rsSchemaName, const std::string &rsTablePathName, unsigned long ulClassID, const std::string &rsIndexName, bool bUnique)
virtual int getTableObjIdIndexIterator(TableObjIdIndexIterator *&prTableIterators, const std::string &rsSchemaName, unsigned long ulClassID) const
virtual int _getTableObjIdIndexIterator(TableObjIdIndexIterator *&prTableIterators, const std::string &rsSchemaName, unsigned long ulClassID) const
virtual int _insertDeletedObjID(const std::string &rsSchemaName, const ObjID &rDeletedObjId)
virtual int _makeTableObjIdIndex(const std::string &rsSchemaName, const std::string &rsTablePathName, unsigned long ulClassID)
virtual int removeObjId(const std::string &rsSchemaName, unsigned long ulClassID, const ObjID &rObjID)
virtual int _insertFreeObjIDPos(const std::string &rsSchemaName, unsigned long ulClassID, std::streampos Pos)
virtual int isObjIdFree(const std::string &rsSchemaName, const ObjID &rObjID) const
virtual int _getFreeObjIDPos(std::streampos &rPos, const std::string &rsSchemaName, unsigned long ulClassID) const
int _removeSchemaIndex(const std::string &rsSchemaName)
virtual int _getSchemaIndex(SchemaIndex *&prRetVal, const std::string &rsSchemaName) const
virtual int insertObjIdPosTuple(const std::string &rsSchemaName, unsigned long ulClassID, const ObjIdPosTuple &rIndexTuple)
virtual bool _isObjIdDeleted(const std::string &rsSchemaName, const ObjID &rObjID) const
void _deleteAllSchemaIndexValues()
virtual int insertObjStrIdTuple(const std::string &rsSchemaName, unsigned long ulClassID, const std::string &rsIndexName, const ObjStrIdTuple &rIndexTuple)
std::map< std::string, SchemaIndex *, std::less< std::string > > m_SchemaIndexMap
Definition GloIndexPool.h:4050
void deleteAllSchemaIndexValues()
virtual int _getObjectStrIndex(ObjectStrIndex *&prRetVal, const std::string &rsSchemaName, unsigned long ulClassID, const std::string &rsIndexName) const
virtual int _isObjIdFree(const std::string &rsSchemaName, unsigned long ulClassID, const ObjID &rObjID) const
virtual ~IndexPool()
int releaseObjStrIdTuple(const std::string &rsSchemaName, unsigned long ulClassID, const std::string &rsIndexName, const NUM_PTR ipReservingComunicatorTrx)
virtual int _removeFreeObjIDPos(const std::string &rsSchemaName, unsigned long ulClassID, std::streampos Pos)
Ein Objekt-ID besteht aus der Klassen-ID, einer Datenbank-ID und der eigentlichen eindeutigen ObjektZ...
Definition GloObjID.h:77
Der reale Index im Gegensatz zum TransactionIndexPool, welcher für jede Transaktion erstellt wird.
Definition GloIndexPool.h:5151
int _readObjStrIndexes(const SchemaInterface &rSchemaInterface)
int _reindexObjIDIndexes(const SchemaInterface &rSchemaInterface)
int _writeObjStrIndexes(const SchemaInterface &rSchemaInterface) const
int writeIndexes(const SchemaInterface &rSchemaInterface, int iActions)
virtual ~RealIndexPool()
int writeObjIDIndexes(const SchemaInterface &rSchemaInterface) const
std::size_t getNumberOfClassInfos(const SchemaInterface &rSchemaInterface) const
int _reindexObjStrIndexes(const SchemaInterface &rSchemaInterface)
int reindexObjIDIndexes(const SchemaInterface &rSchemaInterface)
int writeObjStrIndexes(const SchemaInterface &rSchemaInterface) const
int readIndexes(const SchemaInterface &rSchemaInterface)
virtual bool existsSchemaIndex(const std::string &rsSchemaName) const
RealIndexPool(const RealIndexPool &rT)
void setWatchNotifyManager(WatchNotifyManager *pWatchNotifyManager)
int m_iActions
Definition GloIndexPool.h:5179
int reindexObjStrIndexes(const SchemaInterface &rSchemaInterface)
int removeSchemaIndex(const std::string &rsSchemaName)
std::size_t getNumberOfIndexes(const SchemaInterface &rSchemaInterface) const
int reindex(const SchemaInterface &rSchemaInterface)
virtual int insertFreeObjIDPos(const std::string &rsSchemaName, unsigned long ulClassID, std::streampos Pos)
int _getIndexString(std::string &rsRetValIndex, const std::vector< eut::LanguageFunctions::EnLanguageKey > &rLanguageKeys, bool bCaseSensitive, const SchemaInterface &rSchemaInterface, unsigned long ulClassID, const ObjID &rObjID, const ClassInfoIndex::IndexAttributeItem &rIndexAttributeItem)
void notifyIndexReadWrite(TdWatchNotifyMode iMode, const std::string &rsSchemaName, const ObjID &rObjID, int iFraction, int iActions)
virtual int getFreeObjIDPos(std::streampos &rPos, const std::string &rsSchemaName, unsigned long ulClassID) const
int _writeObjIDIndexes(const SchemaInterface &rSchemaInterface) const
WatchNotifyManager * m_pWatchNotifyManager
Definition GloIndexPool.h:5166
int writeIndexes(const SchemaInterface &rSchemaInterface)
virtual int removeFreeObjIDPos(const std::string &rsSchemaName, unsigned long ulClassID, std::streampos Pos)
int _readObjIDIndexes(const SchemaInterface &rSchemaInterface)
int _writeObjStrIndexes(const SchemaIndex &rSchemaIndex) const
int reindex(const SchemaInterface &rSchemaInterface, int iActions)
int _writeObjIDIndexes(const SchemaIndex &rSchemaIndex) const
int _createObjIDIndexFromTable(const SchemaInterface &rSchemaInterface, const ClassInfoAttribute &rClassInfoAttribute)
int _createObjStrIndexFromTables(const SchemaInterface &rSchemaInterface, const ClassInfoIndex &rClassInfoIndex)
Diese Klasse ist die Schnittstelle zu einem GlobalObjects-Schema. Sie beinhaltet alle Klasseninformat...
Definition GloSchemaInterface.h:84
Dieser Index wird in jeder Transaktion generiert und die Änderungen wie speichern,...
Definition GloIndexPool.h:5924
int insertTransactionDeletedObjID(const std::string &rsSchemaName, const ObjID &rDeletedObjId)
TransactionIndexPool & operator=(const TransactionIndexPool &rT)
Zuweisungsoperator.
int removeTransactionDeletedObjID(const std::string &rsSchemaName, const ObjID &rDeletedObjId)
TransactionIndexPool(const TransactionIndexPool &rT)
Copy-Konstruktor.
TransactionIndexPool(const IndexPool &rT)
Copy-Konstruktor.
Klassen um persistente Objekte überwachen zu können und bei Änderungen die jeweiligen Clients zu bean...
Definition GloWatchNotifyManager.h:344
Definition GloAbstractBaseLot.h:42
EnComparisionOp
Definition GloTypes.h:1583
@ EQUAL
Definition GloTypes.h:1593
EnSeekMode
Definition GloTypes.h:166
EnQueryType
Definition GloTypes.h:1179
unsigned long TdWatchNotifyMode
Definition GloTypes.h:543
Filter können Objekten vom Typ ObjectStrIndexIterator zugeordnet werden, welche das Iterieren durch e...
Definition GloIndexPool.h:2376
virtual ~IndexComparisionFilter()
Definition GloIndexPool.h:2411
EnComparisionOp m_eComparisionOperator
Definition GloIndexPool.h:2387
IndexComparisionFilter()
Definition GloIndexPool.h:2398
Filter können Objekten vom Typ ObjectStrIndexIterator zugeordnet werden, welche das Iterieren durch e...
Definition GloIndexPool.h:2319
virtual ~IndexFilter()
Definition GloIndexPool.h:2343
std::string m_sIndexFilterValue
Definition GloIndexPool.h:2332
Filter können Objekten vom Typ ObjectStrIndexIterator zugeordnet werden, welche das Iterieren durch e...
Definition GloIndexPool.h:2448
std::string m_sIndexFilterEndValue
Definition GloIndexPool.h:2459
virtual ~IndexRangeFilter()
Definition GloIndexPool.h:2470