GlobalObjects
Loading...
Searching...
No Matches
GloClassInfoIndex.h
Go to the documentation of this file.
1#ifndef INC_GLOCLASSINFOINDEX_H
2#define INC_GLOCLASSINFOINDEX_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include <list>
45#include <string>
46#include <vector>
47#include <set>
48#include <unordered_set>
49#include "GloTypes.h"
50#include "GloClassInfoItem.h"
52#include "EuLanguageFunctions.h"
53//-----------------------------------------------------------------------------
54/* Forwards */
55//-----------------------------------------------------------------------------
56namespace glo
57{
58 //---------------------------------------------------------------------------
59 class AttributeID;
60 class SchemaInterface;
61 //---------------------------------------------------------------------------
62 #ifdef _MSC_VER
63 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
64 #pragma warning( disable : 4251 )
65 #endif
66 //---------------------------------------------------------------------------
67 // doxygen -> warning: unable to resolve reference to 'PAGE_GLO_INDEX' for \ref command
68 // Is a reference to the GlobalObjects documentation.
69 //---------------------------------------------------------------------------
85 {
86 private:
87 //============== Friends
88 //-----------------------------------------------------------------------
89 friend class ClassInfo;
90 //-----------------------------------------------------------------------
91
92 public:
93 //-----------------------------------------------------------------------
94 // >>>>>>>>>>>>>>>>>>>>>> IndexAttributeItem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
95 //-----------------------------------------------------------------------
111 {
112 private:
113 //============== Attribute
114 //---------------------------------------------------------------------
149 std::vector< AttributeID > m_IndexPathVector;
150 //---------------------------------------------------------------------
163 //---------------------------------------------------------------------
178 //---------------------------------------------------------------------
179 #ifdef _DEBUG
221 #endif
222 //---------------------------------------------------------------------
223
224 private:
225 //============== Konstruktoren
226 //---------------------------------------------------------------------
237 //---------------------------------------------------------------------
238
239 public:
240 //============== Konstruktoren
241 //---------------------------------------------------------------------
266 IndexAttributeItem( const std::vector< AttributeID > & rIndexPathVector,
267 int iSignificantCharacter,
268 bool bIsNum );
269 //---------------------------------------------------------------------
303 IndexAttributeItem( const std::string & rsIndexPath,
304 int iSignificantCharacter,
305 bool bIsNum );
306 //---------------------------------------------------------------------
319 //---------------------------------------------------------------------
330 //---------------------------------------------------------------------
331
332 //============== Methods
333 //---------------------------------------------------------------------
345 void setIndexPath( const std::vector< AttributeID > & rIndexPathVector );
346 //---------------------------------------------------------------------
369 void setIndexPath( const std::string & rsIndexPath );
370 //---------------------------------------------------------------------
382 std::vector< AttributeID > getIndexPath() const;
383 //---------------------------------------------------------------------
394 std::size_t getIndexPathSize() const;
395 //---------------------------------------------------------------------
410 bool isInIndexPath( const AttributeID & rAttributeID ) const;
411 //---------------------------------------------------------------------
433 long getAttributeIdPositionInIndex( const AttributeID & rAttributeID ) const;
434 //---------------------------------------------------------------------
471 bool changeAtributeIdIfExisting( const AttributeID & rExistingAttributeID,
472 const AttributeID & rNewAttributeID );
473 //---------------------------------------------------------------------
528 EnDataType eNewType,
529 SchemaInterface * pSchemaInterface );
530 //---------------------------------------------------------------------
556 int eraseAttributeIdIfExisting( const AttributeID & rAttributeID );
557 //---------------------------------------------------------------------
582 std::string getIndexPathAsIdString() const;
583 //---------------------------------------------------------------------
601 std::string getIndexPathAsNameString( const SchemaInterface & rSchemaInterface ) const;
602 //---------------------------------------------------------------------
618 void setSignificantCharacter( int iSignificantCharacter );
619 //---------------------------------------------------------------------
634 //---------------------------------------------------------------------
652 void setIsNum( bool bIsNum );
653 //---------------------------------------------------------------------
671 bool getIsNum() const;
672 //---------------------------------------------------------------------
691 //---------------------------------------------------------------------
692
693 //============== Operators
694 //---------------------------------------------------------------------
696
707 bool operator== ( const ClassInfoIndex::IndexAttributeItem & rT ) const;
708 bool operator!= ( const ClassInfoIndex::IndexAttributeItem & rT ) const;
710 //---------------------------------------------------------------------
723 //---------------------------------------------------------------------
724 };
725 //-----------------------------------------------------------------------
726 // <<<<<<<<<<<<<<<<<<<<<< IndexAttributeItem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
727 //-----------------------------------------------------------------------
728
729 private:
730 //============== Attribute
731 //-----------------------------------------------------------------------
741 std::list<IndexAttributeItem *> m_AttributeList;
742 //-----------------------------------------------------------------------
752 std::list< IndexAttributeItem * >::iterator m_AttributeListIterator;
753 //-----------------------------------------------------------------------
764 //-----------------------------------------------------------------------
777 //-----------------------------------------------------------------------
789 std::vector< eut::LanguageFunctions::EnLanguageKey > m_LanguageKeys;
790 //-----------------------------------------------------------------------
812 //-----------------------------------------------------------------------
813
814 public:
815 //============= Konstruktoren
816 //-----------------------------------------------------------------------
827 //-----------------------------------------------------------------------
839 ClassInfoIndex( const std::string & rsIndexName );
840 //-----------------------------------------------------------------------
872 ClassInfoIndex( const std::string & rsIndexName,
873 bool bUnique,
874 bool bCaseSensitive,
875 const std::string & rsLanguageKeys,
876 bool bIndexDelimiter );
877 //-----------------------------------------------------------------------
907 ClassInfoIndex( const std::string & rsIndexName,
908 bool bUnique,
909 bool bCaseSensitive,
910 const std::vector< eut::LanguageFunctions::EnLanguageKey > & rLanguageKeys,
911 bool bIndexDelimiter );
912 //-----------------------------------------------------------------------
925 //-----------------------------------------------------------------------
936 //-----------------------------------------------------------------------
937
938 //============== Methoden
939 //-----------------------------------------------------------------------
954 void setUnique( bool bUnique );
955 //-----------------------------------------------------------------------
968 bool isUnique() const;
969 //-----------------------------------------------------------------------
986 void setCaseSensitive( bool bCaseSensitive );
987 //-----------------------------------------------------------------------
1002 bool isCaseSensitive() const;
1003 //-----------------------------------------------------------------------
1018 void setLanguageKeys( const std::vector< eut::LanguageFunctions::EnLanguageKey > & rLanguageKeys );
1019 //-----------------------------------------------------------------------
1033 //-----------------------------------------------------------------------
1047 //-----------------------------------------------------------------------
1060 std::vector< eut::LanguageFunctions::EnLanguageKey > getLanguageKeys() const;
1061 //-----------------------------------------------------------------------
1079 std::string getLanguageKeysAsString( const std::string & sDelimiter = "|" ) const;
1080 //-----------------------------------------------------------------------
1098 std::string getLanguageIsoCodes( const std::string & sDelimiter = "|" ) const;
1099 //-----------------------------------------------------------------------
1112 void setIndexDelimiter( bool bIndexDelimiter );
1113 //-----------------------------------------------------------------------
1127 //-----------------------------------------------------------------------
1151 void appendIndexAttributeItem( IndexAttributeItem * pIndexAttributeItem );
1152 //-----------------------------------------------------------------------
1176 void appendIndexAttributeItem( const std::vector< AttributeID > & rIndexPathVector,
1177 int iSignificantCharacter,
1178 bool bIsNum );
1179 //-----------------------------------------------------------------------
1214 void appendIndexAttributeItem( const std::string & rsIndexPath,
1215 int iSignificantCharacter,
1216 bool bIsNum );
1217 //-----------------------------------------------------------------------
1251 //-----------------------------------------------------------------------
1265 std::list<ClassInfoIndex::IndexAttributeItem *> * getAttributeListPointer();
1266 //-----------------------------------------------------------------------
1282 void transferAttributeList( std::list< IndexAttributeItem * > & rTargetAttributeList,
1283 const std::list< IndexAttributeItem * > & rSourceAttributeList );
1284 //-----------------------------------------------------------------------
1304 bool attributeListsAreEqual( const std::list< IndexAttributeItem * > & rAttributeList1,
1305 const std::list< IndexAttributeItem * > & rAttributeList2 ) const;
1306 //-----------------------------------------------------------------------
1325 bool thisAttributeListsAreEqualWith( const std::list< IndexAttributeItem * > & rComparisionAttributeList ) const;
1326 //-----------------------------------------------------------------------
1337 //-----------------------------------------------------------------------
1351 void acceptAttributeList( const std::list< IndexAttributeItem * > & rAttributeList );
1352 //-----------------------------------------------------------------------
1362 std::size_t getNumberOfAttributes() const;
1363 //-----------------------------------------------------------------------
1364
1365 //============== Debug-Methoden
1366 //-----------------------------------------------------------------------
1367 #ifdef _DEBUG
1377 std::string _DEBUG_ToString();
1378 #endif
1379 //-----------------------------------------------------------------------
1380
1381 //============== Operatoren
1382 //-----------------------------------------------------------------------
1384
1395 bool operator== ( const ClassInfoIndex & rT ) const;
1396 bool operator!= ( const ClassInfoIndex & rT ) const;
1398 //-----------------------------------------------------------------------
1410 ClassInfoIndex & operator= ( const ClassInfoIndex & rT );
1411 //-----------------------------------------------------------------------
1412 };
1413 //---------------------------------------------------------------------------
1414 #ifdef _MSC_VER
1415 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
1416 #pragma warning( default : 4251 )
1417 #endif
1418 //---------------------------------------------------------------------------
1419} // namespace glo
1420#endif
Header for LanguageFunctions
Header for ClassInfoAttribute and ClassInfoAttribute::Type
Header for ClassInfoItem
For each library, here 'GlobalObjects' there is a type file.
#define __glo_export_dll
Definition GloTypes.h:70
This class reflects a unique ID of a class information attribute.
Definition GloAttributeID.h:81
This class contains all information to store objects of a class in a database, to build objects from ...
Definition GloClassInfo.h:86
Information for the index about which attribute from which class, with how many characters,...
Definition GloClassInfoIndex.h:111
int adjustAttributeTypeIfExisting(const AttributeID &rAttributeID, EnDataType eNewType, SchemaInterface *pSchemaInterface)
bool changeAtributeIdIfExisting(const AttributeID &rExistingAttributeID, const AttributeID &rNewAttributeID)
int m_iSignificantCharacter
Definition GloClassInfoIndex.h:162
bool isInIndexPath(const AttributeID &rAttributeID) const
IndexAttributeItem(const std::vector< AttributeID > &rIndexPathVector, int iSignificantCharacter, bool bIsNum)
std::vector< AttributeID > m_IndexPathVector
Definition GloClassInfoIndex.h:149
bool m_bIsNum
Definition GloClassInfoIndex.h:177
void setSignificantCharacter(int iSignificantCharacter)
int m_iInstanzInfo
Definition GloClassInfoIndex.h:220
IndexAttributeItem(const std::string &rsIndexPath, int iSignificantCharacter, bool bIsNum)
int eraseAttributeIdIfExisting(const AttributeID &rAttributeID)
IndexAttributeItem(const IndexAttributeItem &rT)
std::vector< AttributeID > getIndexPath() const
void setIndexPath(const std::string &rsIndexPath)
std::string getIndexPathAsIdString() const
long getAttributeIdPositionInIndex(const AttributeID &rAttributeID) const
void setIndexPath(const std::vector< AttributeID > &rIndexPathVector)
AttributeID getLastIndexClassInfoAttribute() const
std::string getIndexPathAsNameString(const SchemaInterface &rSchemaInterface) const
In objects of this class, the information for GlobalObjects is how an index is structured.
Definition GloClassInfoIndex.h:85
ClassInfoIndex(const std::string &rsIndexName, bool bUnique, bool bCaseSensitive, const std::vector< eut::LanguageFunctions::EnLanguageKey > &rLanguageKeys, bool bIndexDelimiter)
bool isCaseSensitive() const
bool thisAttributeListsAreEqualWith(const std::list< IndexAttributeItem * > &rComparisionAttributeList) const
void setLanguageKey(eut::LanguageFunctions::EnLanguageKey eLanguageKey)
std::string getLanguageKeysAsString(const std::string &sDelimiter="|") const
std::list< IndexAttributeItem * >::iterator m_AttributeListIterator
Definition GloClassInfoIndex.h:752
std::vector< eut::LanguageFunctions::EnLanguageKey > getLanguageKeys() const
std::size_t getNumberOfAttributes() const
ClassInfoIndex(const ClassInfoIndex &rT)
void setUnique(bool bUnique)
std::vector< eut::LanguageFunctions::EnLanguageKey > m_LanguageKeys
Definition GloClassInfoIndex.h:789
bool usesIndexDelimiter() const
void acceptAttributeList(const std::list< IndexAttributeItem * > &rAttributeList)
void appendIndexAttributeItem(const std::string &rsIndexPath, int iSignificantCharacter, bool bIsNum)
bool m_bIndexDelimiter
Definition GloClassInfoIndex.h:811
void appendIndexAttributeItem(IndexAttributeItem *pIndexAttributeItem)
std::list< ClassInfoIndex::IndexAttributeItem * > * getAttributeListPointer()
bool isUnique() const
ClassInfoIndex(const std::string &rsIndexName)
virtual ~ClassInfoIndex()
void setLanguageKeys(const std::vector< eut::LanguageFunctions::EnLanguageKey > &rLanguageKeys)
bool m_bCaseSensitive
Definition GloClassInfoIndex.h:776
std::string _DEBUG_ToString()
void removeLanguage(eut::LanguageFunctions::EnLanguageKey eLanguageKey)
void appendIndexAttributeItem(const std::vector< AttributeID > &rIndexPathVector, int iSignificantCharacter, bool bIsNum)
void setCaseSensitive(bool bCaseSensitive)
ClassInfoIndex(const std::string &rsIndexName, bool bUnique, bool bCaseSensitive, const std::string &rsLanguageKeys, bool bIndexDelimiter)
void transferAttributeList(std::list< IndexAttributeItem * > &rTargetAttributeList, const std::list< IndexAttributeItem * > &rSourceAttributeList)
bool attributeListsAreEqual(const std::list< IndexAttributeItem * > &rAttributeList1, const std::list< IndexAttributeItem * > &rAttributeList2) const
ClassInfoIndex::IndexAttributeItem * getIndexAttributeItem(EnSeekMode eMode)
std::list< IndexAttributeItem * > m_AttributeList
Definition GloClassInfoIndex.h:741
bool m_bUnique
Definition GloClassInfoIndex.h:763
void setIndexDelimiter(bool bIndexDelimiter)
std::string getLanguageIsoCodes(const std::string &sDelimiter="|") const
Base class of a ClassInfoAttribute and a ClassInfoIndex.
Definition GloClassInfoItem.h:76
This class is the interface to a GlobalObjects schema. It contains all class information to store obj...
Definition GloSchemaInterface.h:91
EnLanguageKey
Definition EuLanguageFunctions.h:87
Definition GloAbstractBaseLot.h:49
EnSeekMode
Definition GloTypes.h:173
EnDataType
Definition GloRecordAttributeTypes.h:558