GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloSchemaInterface.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLOSCHEMAINTERFACE_H
2#define INC_GLOSCHEMAINTERFACE_H
3//-----------------------------------------------------------------------------
36//-----------------------------------------------------------------------------
37#ifdef _MSC_VER
38 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
39 #pragma warning( disable : 4251 )
40#endif
41//-----------------------------------------------------------------------------
42#include "GloTypes.h"
44#include "GloClassInfoIndex.h"
45#include "GloClassInfo.h"
46#include <string>
47#include <map>
48#include <vector>
49#include <list>
50#include <set>
51//-----------------------------------------------------------------------------
52namespace glo
53{
54 //---------------------------------------------------------------------------
55 #ifdef _MSC_VER
56 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
57 #pragma warning( disable : 4251 )
58 #endif
59 //---------------------------------------------------------------------------
84 {
85 private:
86 //-----------------------------------------------------------------------
87 // >>>>>>>>>>>>>>>>>>>> TempGloClassInfoIndex >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
88 //-----------------------------------------------------------------------
110 {
111 //============== Attribute
112 //---------------------------------------------------------------------
123 //---------------------------------------------------------------------
134 //---------------------------------------------------------------------
145 std::string m_sIndexPath;
146 //---------------------------------------------------------------------
157 //---------------------------------------------------------------------
158
159 //============= De- und Konstruktoren
160 //---------------------------------------------------------------------
181 const std::string & rsIndexPath,
182 int iSignificantCharacter );
183 //---------------------------------------------------------------------
184 };
185 //-----------------------------------------------------------------------
186 // <<<<<<<<<<<<<<<<<<<< TempGloClassInfoIndex <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
187 //-----------------------------------------------------------------------
188
189 //============== Friends
190 //-----------------------------------------------------------------------
191 friend class Record;
192 friend class BaseMaker;
193 //-----------------------------------------------------------------------
194
195 //============== Attribute
196 //-----------------------------------------------------------------------
211 //-----------------------------------------------------------------------
221 unsigned long m_ulID;
222 //-----------------------------------------------------------------------
232 std::string m_sDescription;
233 //-----------------------------------------------------------------------
245 unsigned long m_ulVersion;
246 //-----------------------------------------------------------------------
258 std::string m_sSchemaFullName;
259 //-----------------------------------------------------------------------
271 std::string m_sDataSubDir;
272 //-----------------------------------------------------------------------
282 std::map< unsigned long, ClassInfo *, std::less<unsigned long> > m_ClassInfoMap;
283 //-----------------------------------------------------------------------
295 std::map< unsigned long, ClassInfo * >::iterator m_ClassInfoMapIterator;
296 //-----------------------------------------------------------------------
308 std::vector<unsigned long> m_CurrentlyAssignedClassIDVector;
309 //-----------------------------------------------------------------------
310
311 protected:
312 //============== Konstruktoren
313 //-----------------------------------------------------------------------
324 //-----------------------------------------------------------------------
340 SchemaInterface( const std::map< unsigned long, ClassInfo * > * pClassInfoMap );
341 //-----------------------------------------------------------------------
355 SchemaInterface( const std::map< unsigned long, std::shared_ptr<glo::ClassInfo> > rClassInfoMap );
356 //-----------------------------------------------------------------------
357
358 public:
359 //============== Konstruktoren
360 //-----------------------------------------------------------------------
384 SchemaInterface( const std::string & rsSchemaFullName,
385 bool bInDeveloperMode = false );
386 //-----------------------------------------------------------------------
416 SchemaInterface( const std::string & rsSchemaFullName,
417 bool bInDeveloperMode,
418 bool bNew );
419 //-----------------------------------------------------------------------
432 //-----------------------------------------------------------------------
443 //-----------------------------------------------------------------------
444
445 private:
446 //============== Methoden
447 //-----------------------------------------------------------------------
463 void init();
464 //-----------------------------------------------------------------------
480 void initNew();
481 //-----------------------------------------------------------------------
482
483 public:
484 //============== Methoden
485 //-----------------------------------------------------------------------
500 //-----------------------------------------------------------------------
512 void setDescription( const std::string & rsDescription );
513 //-----------------------------------------------------------------------
525 std::string getDescription() const;
526 //-----------------------------------------------------------------------
538 void setSchemaID( unsigned long ulID );
539 //-----------------------------------------------------------------------
551 unsigned long getSchemaID() const;
552 //-----------------------------------------------------------------------
564 void setVersion( unsigned long ulVersion );
565 //-----------------------------------------------------------------------
577 unsigned long getVersion() const;
578 //-----------------------------------------------------------------------
592 void setSchemaFullName( const std::string & rsSchemaFullName );
593 //-----------------------------------------------------------------------
607 std::string getSchemaFullName() const;
608 //-----------------------------------------------------------------------
622 std::string getSchemaPath() const;
623 //-----------------------------------------------------------------------
635 std::string getSchemaName() const;
636 //-----------------------------------------------------------------------
652 void setDataSubDir( const std::string & rsDataSubDir );
653 //-----------------------------------------------------------------------
669 std::string getDataSubDir() const;
670 //-----------------------------------------------------------------------
688 std::string getDataPath() const;
689 //-----------------------------------------------------------------------
701 unsigned long getNextClassID();
702 //-----------------------------------------------------------------------
714 std::size_t getNumberOfClassInfos() const;
715 //-----------------------------------------------------------------------
737 int insertClassInfo( ClassInfo * pNewClassInfo );
738 //-----------------------------------------------------------------------
761 int destroyClassInfo( unsigned long ulClassID );
762 //-----------------------------------------------------------------------
776 bool classInfoNameExisting( const std::string & rsClassName ) const;
777 //-----------------------------------------------------------------------
791 bool classInfoFileNameExisting( const std::string & rsClassFileName ) const;
792 //-----------------------------------------------------------------------
806 bool classIdExisting( unsigned long ulClassID ) const;
807 //-----------------------------------------------------------------------
838 //-----------------------------------------------------------------------
858 ClassInfo * getClassInfoByID( unsigned long ulClassID ) const;
859 //-----------------------------------------------------------------------
880 ClassInfo * getClassInfoByName( const std::string & rsClassName ) const;
881 //-----------------------------------------------------------------------
901 ClassInfo * getClassInfoByMainTable(const std::string & rsMainTableName) const;
902 //-----------------------------------------------------------------------
922 int getAllSuperClassIDs( std::set<unsigned long> & rSuperClassIdSet,
923 unsigned long ulClassID ) const;
924 //-----------------------------------------------------------------------
964 int getSuperClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rSuperClassInfoMap,
965 unsigned long ulClassID,
966 bool bCopy = true ) const;
967 //-----------------------------------------------------------------------
1007 int getAllSuperClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rSuperClassInfoMap,
1008 unsigned long ulClassID,
1009 bool bCopy = true ) const;
1010 //-----------------------------------------------------------------------
1022 //-----------------------------------------------------------------------
1061 int getSubClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rSubClassInfoMap,
1062 unsigned long ulClassID,
1063 bool bCopy = true ) const;
1064 //-----------------------------------------------------------------------
1103 int getAllSubClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rSubClassInfoMap,
1104 unsigned long ulClassID,
1105 bool bCopy = true ) const;
1106 //-----------------------------------------------------------------------
1138 int getAllClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rClassInfoMap,
1139 bool bCopy = true ) const;
1140 //-----------------------------------------------------------------------
1173 unsigned long ulClassID,
1174 const std::string & rsTableName,
1175 const std::string & rsFieldName ) const;
1176 //-----------------------------------------------------------------------
1205 const std::string & rsTableName,
1206 const std::string & rsFieldName ) const;
1207 //-----------------------------------------------------------------------
1236 const std::string & rsClassName,
1237 const std::string & rsAttributeName ) const;
1238 //-----------------------------------------------------------------------
1260 const AttributeID & rAttributeID ) const;
1261 //-----------------------------------------------------------------------
1293 int getAllAttributes( std::set<ClassInfoAttribute*> & rRetValSet,
1294 unsigned long ulClassID,
1295 bool bWithSuperClassAttributes = true ) const;
1296 //-----------------------------------------------------------------------
1318 int getAllAttributes( std::map< std::string, ClassInfoAttribute*, std::less<std::string> > & rRetValMap ) const;
1319 //-----------------------------------------------------------------------
1348 const std::string & rsClassName,
1349 const std::string & rsIndexName ) const;
1350 //-----------------------------------------------------------------------
1372 int getAllTableNames( std::vector<std::string> & rTableNameList,
1373 unsigned long ulClassID ) const;
1374 //-----------------------------------------------------------------------
1391 int getAllTableNames( std::map< std::string, std::string, std::less<std::string> > & rTableNameMap ) const;
1392 //-----------------------------------------------------------------------
1408 bool tableNameExisting( const std::string & rsTableName ) const;
1409 //-----------------------------------------------------------------------
1428 bool isSuperClassFrom( unsigned long ulClassIDSuperClass,
1429 unsigned long ulClassIDSubClass ) const;
1430 //-----------------------------------------------------------------------
1452 int getClassTableWithPath( std::string & rstrRetVal, unsigned long ulClassID ) const;
1453 //-----------------------------------------------------------------------
1482 void changeAllClassReferences( const std::string & rsOldReferenceName,
1483 const std::string & rsNewReferenceName,
1484 std::map< unsigned long, ClassInfo *, std::less<unsigned long> > * pChangedClassesMap );
1485 //-----------------------------------------------------------------------
1486
1487 protected:
1488 //============== Methoden
1489 //-----------------------------------------------------------------------
1507 bool containedInClassInfoAttributeList( const std::set<ClassInfoAttribute*> & rCheckSet,
1508 const ClassInfoAttribute & rCheckAttribut ) const;
1509 //-----------------------------------------------------------------------
1510
1511 private:
1512 //============== Methoden
1513 //-----------------------------------------------------------------------
1558 int getSuperClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rSuperClassInfoMap,
1559 unsigned long ulClassID,
1560 bool bCopy,
1561 bool bDeep ) const;
1562 //-----------------------------------------------------------------------
1605 int getSubClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rSubClassInfoMap,
1606 unsigned long ulClassID,
1607 bool bCopy,
1608 bool bDeep ) const;
1609 //-----------------------------------------------------------------------
1622 //-----------------------------------------------------------------------
1637 //-----------------------------------------------------------------------
1657 int changeClassNameDotAttributNameInAttributeID( std::vector<TempGloClassInfoIndex> & rTempGloClassInfoIndexVector );
1658 //-----------------------------------------------------------------------
1659
1660 public:
1661 //============== Operatoren
1662 //-----------------------------------------------------------------------
1674 SchemaInterface & operator= ( const SchemaInterface & rT );
1675 //-----------------------------------------------------------------------
1676
1677 //============== Debug-Methoden
1678 //-----------------------------------------------------------------------
1679 #ifdef _DEBUG
1680 std::string _DEBUG_ToString();
1681 #endif
1682 //-----------------------------------------------------------------------
1683 };
1684 //---------------------------------------------------------------------------
1685 #ifdef _MSC_VER
1686 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
1687 #pragma warning( default : 4251 )
1688 #endif
1689 //---------------------------------------------------------------------------
1690} // namespace glo
1691//-----------------------------------------------------------------------------
1692#ifdef _MSC_VER
1693 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
1694 #pragma warning( default : 4251 )
1695#endif
1696//-----------------------------------------------------------------------------
1697#endif
Header für ClassInfo und ClassInfo::SuperClassIdInfoTuple
Header für ClassInfoAttribute und ClassInfoAttribute::Type
Header für ClassInfoIndex und ClassInfoIndex::IndexAttributeItem
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:63
Diese Klasse spiegelt eine eindeutige ID eines Klasseninformations-Attributes wieder.
Definition GloAttributeID.h:74
Generiert mit Hilfe vom SchemaInterface, Datentabellen, C++ Header- und Source-Files etc....
Definition GloBaseMaker.h:72
In Objekten dieser Klasse sind die Information für GlobalObjects, wie ein persistentes Klassenattribu...
Definition GloClassInfoAttribute.h:76
Diese Klasse beinhaltet alle Informationen um Objekte einer Klasse in einer Datenbank speichern zu kö...
Definition GloClassInfo.h:79
In Objekten dieser Klasse sind die Information für GlobalObjects, wie ein Index aufgebaut ist.
Definition GloClassInfoIndex.h:78
Objekte dieser Klasse transportieren die Daten von den Tabellen ins persistente Objekt und von diesen...
Definition GloRecord.h:101
Diese Klasse ist die Schnittstelle zu einem GlobalObjects-Schema. Sie beinhaltet alle Klasseninformat...
Definition GloSchemaInterface.h:84
ClassInfoAttribute * getClassInfoAttributeByTableAndFieldName(int &riErr, const std::string &rsTableName, const std::string &rsFieldName) const
SchemaInterface(const SchemaInterface &rT)
int getAllAttributes(std::map< std::string, ClassInfoAttribute *, std::less< std::string > > &rRetValMap) const
std::string getDataSubDir() const
virtual ~SchemaInterface()
int insertClassInfo(ClassInfo *pNewClassInfo)
std::map< unsignedlong, ClassInfo * >::iterator m_ClassInfoMapIterator
Definition GloSchemaInterface.h:295
bool isSuperClassFrom(unsigned long ulClassIDSuperClass, unsigned long ulClassIDSubClass) const
void setDescription(const std::string &rsDescription)
SchemaInterface(const std::map< unsigned long, std::shared_ptr< glo::ClassInfo > > rClassInfoMap)
std::string getDataPath() const
int changeClassNameDotAttributNameInAttributeID(std::vector< TempGloClassInfoIndex > &rTempGloClassInfoIndexVector)
void setVersion(unsigned long ulVersion)
void setSchemaFullName(const std::string &rsSchemaFullName)
bool m_bInDeveloperMode
Definition GloSchemaInterface.h:210
bool classInfoFileNameExisting(const std::string &rsClassFileName) const
bool classInfoNameExisting(const std::string &rsClassName) const
int getSubClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rSubClassInfoMap, unsigned long ulClassID, bool bCopy=true) const
ClassInfoIndex * getClassInfoIndexByClassAndIndexName(int &riErr, const std::string &rsClassName, const std::string &rsIndexName) const
ClassInfoAttribute * getClassInfoAttributeByTableAndFieldName(int &riErr, unsigned long ulClassID, const std::string &rsTableName, const std::string &rsFieldName) const
std::string getSchemaFullName() const
void setSubClassInfosInAllClassInfo()
std::string m_sSchemaFullName
Definition GloSchemaInterface.h:258
int getAllTableNames(std::vector< std::string > &rTableNameList, unsigned long ulClassID) const
int destroyClassInfo(unsigned long ulClassID)
ClassInfo * getClassInfo(EnSeekMode eMode)
std::string _DEBUG_ToString()
int getAllAttributes(std::set< ClassInfoAttribute * > &rRetValSet, unsigned long ulClassID, bool bWithSuperClassAttributes=true) const
unsigned long getVersion() const
unsigned long getNextClassID()
std::string m_sDataSubDir
Definition GloSchemaInterface.h:271
bool containedInClassInfoAttributeList(const std::set< ClassInfoAttribute * > &rCheckSet, const ClassInfoAttribute &rCheckAttribut) const
SchemaInterface(const std::string &rsSchemaFullName, bool bInDeveloperMode=false)
int getAllTableNames(std::map< std::string, std::string, std::less< std::string > > &rTableNameMap) const
std::string getDescription() const
SchemaInterface(const std::string &rsSchemaFullName, bool bInDeveloperMode, bool bNew)
std::string getSchemaPath() const
ClassInfoAttribute * getClassInfoAttributeByAttributeID(int &riErr, const AttributeID &rAttributeID) const
int getAllSubClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rSubClassInfoMap, unsigned long ulClassID, bool bCopy=true) const
SchemaInterface(const std::map< unsigned long, ClassInfo * > *pClassInfoMap)
ClassInfo * getClassInfoByID(unsigned long ulClassID) const
int getSuperClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rSuperClassInfoMap, unsigned long ulClassID, bool bCopy, bool bDeep) const
bool tableNameExisting(const std::string &rsTableName) const
int getAllClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rClassInfoMap, bool bCopy=true) const
unsigned long m_ulVersion
Definition GloSchemaInterface.h:245
std::size_t getNumberOfClassInfos() const
int getAllSuperClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rSuperClassInfoMap, unsigned long ulClassID, bool bCopy=true) const
int getAllSuperClassIDs(std::set< unsigned long > &rSuperClassIdSet, unsigned long ulClassID) const
std::map< unsigned long, ClassInfo *, std::less< unsigned long > > m_ClassInfoMap
Definition GloSchemaInterface.h:282
ClassInfo * getClassInfoByMainTable(const std::string &rsMainTableName) const
void setSchemaID(unsigned long ulID)
unsigned long getSchemaID() const
std::vector< unsigned long > m_CurrentlyAssignedClassIDVector
Definition GloSchemaInterface.h:308
void setDataSubDir(const std::string &rsDataSubDir)
bool classIdExisting(unsigned long ulClassID) const
int getSuperClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rSuperClassInfoMap, unsigned long ulClassID, bool bCopy=true) const
int getSubClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rSubClassInfoMap, unsigned long ulClassID, bool bCopy, bool bDeep) const
void copyClassInfoListFrom(const SchemaInterface &rT)
ClassInfo * getClassInfoByName(const std::string &rsClassName) const
std::string m_sDescription
Definition GloSchemaInterface.h:232
unsigned long m_ulID
Definition GloSchemaInterface.h:221
ClassInfoAttribute * getClassInfoAttributeByClassAndAttributeName(int &riErr, const std::string &rsClassName, const std::string &rsAttributeName) const
std::string getSchemaName() const
int getClassTableWithPath(std::string &rstrRetVal, unsigned long ulClassID) const
void changeAllClassReferences(const std::string &rsOldReferenceName, const std::string &rsNewReferenceName, std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *pChangedClassesMap)
Definition GloAbstractBaseLot.h:42
EnSeekMode
Definition GloTypes.h:166
Struktur um Indexe bis zum Ende des Einlesens aus der Schemadatei zu sammeln.
Definition GloSchemaInterface.h:110
std::string m_sIndexPath
Definition GloSchemaInterface.h:145
int m_iSignificantCharacter
Definition GloSchemaInterface.h:156
ClassInfoIndex * m_pClassInfoIndex
Definition GloSchemaInterface.h:122
bool m_bAccepted
Definition GloSchemaInterface.h:133
TempGloClassInfoIndex(ClassInfoIndex *pClassInfoIndex, const std::string &rsIndexPath, int iSignificantCharacter)