GlobalObjects
Loading...
Searching...
No Matches
GloSchemaInterface.h
Go to the documentation of this file.
1#ifndef INC_GLOSCHEMAINTERFACE_H
2#define INC_GLOSCHEMAINTERFACE_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#ifdef _MSC_VER
45 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
46 #pragma warning( disable : 4251 )
47#endif
48//-----------------------------------------------------------------------------
49#include "GloTypes.h"
51#include "GloClassInfoIndex.h"
52#include "GloClassInfo.h"
53#include <string>
54#include <map>
55#include <vector>
56#include <list>
57#include <set>
58//-----------------------------------------------------------------------------
59namespace glo
60{
61 //---------------------------------------------------------------------------
62 #ifdef _MSC_VER
63 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
64 #pragma warning( disable : 4251 )
65 #endif
66 //---------------------------------------------------------------------------
91 {
92 private:
93 //-----------------------------------------------------------------------
94 // >>>>>>>>>>>>>>>>>>>> TempGloClassInfoIndex >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
95 //-----------------------------------------------------------------------
117 {
118 //============== Attribute
119 //---------------------------------------------------------------------
130 //---------------------------------------------------------------------
141 //---------------------------------------------------------------------
152 std::string m_sIndexPath;
153 //---------------------------------------------------------------------
164 //---------------------------------------------------------------------
165
166 //============= De- und Konstruktoren
167 //---------------------------------------------------------------------
188 const std::string & rsIndexPath,
189 int iSignificantCharacter );
190 //---------------------------------------------------------------------
191 };
192 //-----------------------------------------------------------------------
193 // <<<<<<<<<<<<<<<<<<<< TempGloClassInfoIndex <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
194 //-----------------------------------------------------------------------
195
196 //============== Friends
197 //-----------------------------------------------------------------------
198 friend class Record;
199 friend class BaseMaker;
200 //-----------------------------------------------------------------------
201
202 //============== Attribute
203 //-----------------------------------------------------------------------
218 //-----------------------------------------------------------------------
228 unsigned long m_ulID;
229 //-----------------------------------------------------------------------
239 std::string m_sDescription;
240 //-----------------------------------------------------------------------
252 unsigned long m_ulVersion;
253 //-----------------------------------------------------------------------
265 std::string m_sSchemaFullName;
266 //-----------------------------------------------------------------------
278 std::string m_sDataSubDir;
279 //-----------------------------------------------------------------------
292 std::string m_sSchemaDataPath;
293 //-----------------------------------------------------------------------
303 std::map< unsigned long, ClassInfo *, std::less<unsigned long> > m_ClassInfoMap;
304 //-----------------------------------------------------------------------
316 std::map< unsigned long, ClassInfo * >::iterator m_ClassInfoMapIterator;
317 //-----------------------------------------------------------------------
329 std::vector<unsigned long> m_CurrentlyAssignedClassIDVector;
330 //-----------------------------------------------------------------------
331
332 protected:
333 //============== Konstruktoren
334 //-----------------------------------------------------------------------
345 //-----------------------------------------------------------------------
361 SchemaInterface( const std::map< unsigned long, ClassInfo * > * pClassInfoMap );
362 //-----------------------------------------------------------------------
376 SchemaInterface( const std::map< unsigned long, std::shared_ptr<glo::ClassInfo> > rClassInfoMap );
377 //-----------------------------------------------------------------------
378
379 public:
380 //============== Konstruktoren
381 //-----------------------------------------------------------------------
405 SchemaInterface( const std::string & rsSchemaFullName,
406 bool bInDeveloperMode = false );
407 //-----------------------------------------------------------------------
437 SchemaInterface( const std::string & rsSchemaFullName,
438 bool bInDeveloperMode,
439 bool bNew );
440 //-----------------------------------------------------------------------
453 //-----------------------------------------------------------------------
464 //-----------------------------------------------------------------------
465
466 private:
467 //============== Methoden
468 //-----------------------------------------------------------------------
484 void init();
485 //-----------------------------------------------------------------------
501 void initNew();
502 //-----------------------------------------------------------------------
503
504 public:
505 //============== Methoden
506 //-----------------------------------------------------------------------
521 //-----------------------------------------------------------------------
533 void setDescription( const std::string & rsDescription );
534 //-----------------------------------------------------------------------
546 std::string getDescription() const;
547 //-----------------------------------------------------------------------
559 void setSchemaID( unsigned long ulID );
560 //-----------------------------------------------------------------------
572 unsigned long getSchemaID() const;
573 //-----------------------------------------------------------------------
585 void setVersion( unsigned long ulVersion );
586 //-----------------------------------------------------------------------
598 unsigned long getVersion() const;
599 //-----------------------------------------------------------------------
613 void setSchemaFullName( const std::string & rsSchemaFullName );
614 //-----------------------------------------------------------------------
628 std::string getSchemaFullName() const;
629 //-----------------------------------------------------------------------
643 std::string getSchemaPath() const;
644 //-----------------------------------------------------------------------
656 std::string getSchemaName() const;
657 //-----------------------------------------------------------------------
673 void setDataSubDir( const std::string & rsDataSubDir );
674 //-----------------------------------------------------------------------
690 std::string getDataSubDir() const;
691 //-----------------------------------------------------------------------
709 std::string getDataPath() const;
710 //-----------------------------------------------------------------------
722 unsigned long getNextClassID();
723 //-----------------------------------------------------------------------
735 std::size_t getNumberOfClassInfos() const;
736 //-----------------------------------------------------------------------
758 int insertClassInfo( ClassInfo * pNewClassInfo );
759 //-----------------------------------------------------------------------
782 int destroyClassInfo( unsigned long ulClassID );
783 //-----------------------------------------------------------------------
797 bool classInfoNameExisting( const std::string & rsClassName ) const;
798 //-----------------------------------------------------------------------
812 bool classInfoFileNameExisting( const std::string & rsClassFileName ) const;
813 //-----------------------------------------------------------------------
827 bool classIdExisting( unsigned long ulClassID ) const;
828 //-----------------------------------------------------------------------
859 //-----------------------------------------------------------------------
879 ClassInfo * getClassInfoByID( unsigned long ulClassID ) const;
880 //-----------------------------------------------------------------------
901 ClassInfo * getClassInfoByName( const std::string & rsClassName ) const;
902 //-----------------------------------------------------------------------
922 ClassInfo * getClassInfoByMainTable(const std::string & rsMainTableName) const;
923 //-----------------------------------------------------------------------
943 int getAllSuperClassIDs( std::set<unsigned long> & rSuperClassIdSet,
944 unsigned long ulClassID ) const;
945 //-----------------------------------------------------------------------
985 int getSuperClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rSuperClassInfoContainer,
986 unsigned long ulClassID,
987 bool bCopy = true ) const;
988 //-----------------------------------------------------------------------
1028 int getAllSuperClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rSuperClassInfoContainer,
1029 unsigned long ulClassID,
1030 bool bCopy = true ) const;
1031 //-----------------------------------------------------------------------
1043 //-----------------------------------------------------------------------
1082 int getSubClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rSubClassInfoContainer,
1083 unsigned long ulClassID,
1084 bool bCopy = true ) const;
1085 //-----------------------------------------------------------------------
1124 int getAllSubClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rSubClassInfoContainer,
1125 unsigned long ulClassID,
1126 bool bCopy = true ) const;
1127 //-----------------------------------------------------------------------
1159 int getAllClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rClassInfoContainer,
1160 bool bCopy = true ) const;
1161 //-----------------------------------------------------------------------
1194 unsigned long ulClassID,
1195 const std::string & rsTableName,
1196 const std::string & rsFieldName ) const;
1197 //-----------------------------------------------------------------------
1226 const std::string & rsTableName,
1227 const std::string & rsFieldName ) const;
1228 //-----------------------------------------------------------------------
1257 const std::string & rsClassName,
1258 const std::string & rsAttributeName ) const;
1259 //-----------------------------------------------------------------------
1281 const AttributeID & rAttributeID ) const;
1282 //-----------------------------------------------------------------------
1315 int getAllAttributes( std::set<ClassInfoAttribute*> & rRetValContainer,
1316 unsigned long ulClassID,
1317 bool bWithSuperClassAttributes = true ) const;
1318 //-----------------------------------------------------------------------
1341 int getAllAttributes( std::map< std::string, ClassInfoAttribute*, std::less<std::string> > & rRetValContainer ) const;
1342 //-----------------------------------------------------------------------
1371 const std::string & rsClassName,
1372 const std::string & rsIndexName ) const;
1373 //-----------------------------------------------------------------------
1395 int getAllTableNames( std::vector<std::string> & rTableNameContainer,
1396 unsigned long ulClassID ) const;
1397 //-----------------------------------------------------------------------
1415 int getAllTableNames( std::map< std::string, std::string, std::less<std::string> > & rTableNameContainer ) const;
1416 //-----------------------------------------------------------------------
1432 bool tableNameExisting( const std::string & rsTableName ) const;
1433 //-----------------------------------------------------------------------
1452 bool isSuperClassFrom( unsigned long ulClassIDSuperClass,
1453 unsigned long ulClassIDSubClass ) const;
1454 //-----------------------------------------------------------------------
1476 int getClassTableWithPath( std::string & rstrRetVal, unsigned long ulClassID ) const;
1477 //-----------------------------------------------------------------------
1506 void changeAllClassReferences( const std::string & rsOldReferenceName,
1507 const std::string & rsNewReferenceName,
1508 std::map< unsigned long, ClassInfo *, std::less<unsigned long> > * pChangedClassesContainer );
1509 //-----------------------------------------------------------------------
1510
1511 protected:
1512 //============== Methoden
1513 //-----------------------------------------------------------------------
1514
1515 private:
1516 //============== Methoden
1517 //-----------------------------------------------------------------------
1563 int getSuperClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rSuperClassInfoContainer,
1564 unsigned long ulClassID,
1565 bool bCopy,
1566 bool bDeep ) const;
1567 //-----------------------------------------------------------------------
1610 int getSubClassInfos( std::map< unsigned long, ClassInfo *, std::less<unsigned long> > & rSubClassInfoContainer,
1611 unsigned long ulClassID,
1612 bool bCopy,
1613 bool bDeep ) const;
1614 //-----------------------------------------------------------------------
1627 //-----------------------------------------------------------------------
1642 //-----------------------------------------------------------------------
1662 int changeClassNameDotAttributNameInAttributeID( std::vector<TempGloClassInfoIndex> & rTempGloClassInfoIndexVector );
1663 //-----------------------------------------------------------------------
1664
1665 public:
1666 //============== Operatoren
1667 //-----------------------------------------------------------------------
1679 SchemaInterface & operator= ( const SchemaInterface & rT );
1680 //-----------------------------------------------------------------------
1681
1682 //============== Debug-Methoden
1683 //-----------------------------------------------------------------------
1684 #ifdef _DEBUG
1685 std::string _DEBUG_ToString();
1686 #endif
1687 //-----------------------------------------------------------------------
1688 };
1689 //---------------------------------------------------------------------------
1690 #ifdef _MSC_VER
1691 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
1692 #pragma warning( default : 4251 )
1693 #endif
1694 //---------------------------------------------------------------------------
1695} // namespace glo
1696//-----------------------------------------------------------------------------
1697#ifdef _MSC_VER
1698 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
1699 #pragma warning( default : 4251 )
1700#endif
1701//-----------------------------------------------------------------------------
1702#endif
Header for ClassInfo and ClassInfo::SuperClassIdInfoTuple
Header for ClassInfoAttribute and ClassInfoAttribute::Type
Header for ClassInfoIndex and ClassInfoIndex::IndexAttributeItem
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
Generated using the SchemaInterface, data tables, C++ header and source files etc....
Definition GloBaseMaker.h:79
In objects of this class, the information for GlobalObjects is how a persistent class attribute is st...
Definition GloClassInfoAttribute.h:83
This class contains all information to store objects of a class in a database, to build objects from ...
Definition GloClassInfo.h:86
In objects of this class, the information for GlobalObjects is how an index is structured.
Definition GloClassInfoIndex.h:85
Objects of this class transport the data from the tables into the persistent object and from these ag...
Definition GloRecord.h:108
This class is the interface to a GlobalObjects schema. It contains all class information to store obj...
Definition GloSchemaInterface.h:91
int getSubClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rSubClassInfoContainer, unsigned long ulClassID, bool bCopy, bool bDeep) const
ClassInfoAttribute * getClassInfoAttributeByTableAndFieldName(int &riErr, const std::string &rsTableName, const std::string &rsFieldName) const
SchemaInterface(const SchemaInterface &rT)
std::string getDataSubDir() const
int getAllTableNames(std::map< std::string, std::string, std::less< std::string > > &rTableNameContainer) const
virtual ~SchemaInterface()
int insertClassInfo(ClassInfo *pNewClassInfo)
std::map< unsignedlong, ClassInfo * >::iterator m_ClassInfoMapIterator
Definition GloSchemaInterface.h:316
std::string m_sSchemaDataPath
Definition GloSchemaInterface.h:292
int getAllAttributes(std::map< std::string, ClassInfoAttribute *, std::less< std::string > > &rRetValContainer) const
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)
int getSubClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rSubClassInfoContainer, unsigned long ulClassID, bool bCopy=true) const
void setVersion(unsigned long ulVersion)
void setSchemaFullName(const std::string &rsSchemaFullName)
int getAllClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rClassInfoContainer, bool bCopy=true) const
bool m_bInDeveloperMode
Definition GloSchemaInterface.h:217
bool classInfoFileNameExisting(const std::string &rsClassFileName) const
bool classInfoNameExisting(const std::string &rsClassName) 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:265
int getAllSubClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rSubClassInfoContainer, unsigned long ulClassID, bool bCopy=true) const
int destroyClassInfo(unsigned long ulClassID)
ClassInfo * getClassInfo(EnSeekMode eMode)
std::string _DEBUG_ToString()
unsigned long getVersion() const
int getAllTableNames(std::vector< std::string > &rTableNameContainer, unsigned long ulClassID) const
unsigned long getNextClassID()
std::string m_sDataSubDir
Definition GloSchemaInterface.h:278
SchemaInterface(const std::string &rsSchemaFullName, bool bInDeveloperMode=false)
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
void changeAllClassReferences(const std::string &rsOldReferenceName, const std::string &rsNewReferenceName, std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *pChangedClassesContainer)
SchemaInterface(const std::map< unsigned long, ClassInfo * > *pClassInfoMap)
ClassInfo * getClassInfoByID(unsigned long ulClassID) const
bool tableNameExisting(const std::string &rsTableName) const
int getAllAttributes(std::set< ClassInfoAttribute * > &rRetValContainer, unsigned long ulClassID, bool bWithSuperClassAttributes=true) const
unsigned long m_ulVersion
Definition GloSchemaInterface.h:252
std::size_t getNumberOfClassInfos() 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:303
ClassInfo * getClassInfoByMainTable(const std::string &rsMainTableName) const
void setSchemaID(unsigned long ulID)
unsigned long getSchemaID() const
int getSuperClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rSuperClassInfoContainer, unsigned long ulClassID, bool bCopy=true) const
int getSuperClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rSuperClassInfoContainer, unsigned long ulClassID, bool bCopy, bool bDeep) const
int getAllSuperClassInfos(std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rSuperClassInfoContainer, unsigned long ulClassID, bool bCopy=true) const
std::vector< unsigned long > m_CurrentlyAssignedClassIDVector
Definition GloSchemaInterface.h:329
void setDataSubDir(const std::string &rsDataSubDir)
bool classIdExisting(unsigned long ulClassID) const
void copyClassInfoListFrom(const SchemaInterface &rT)
ClassInfo * getClassInfoByName(const std::string &rsClassName) const
std::string m_sDescription
Definition GloSchemaInterface.h:239
unsigned long m_ulID
Definition GloSchemaInterface.h:228
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
Definition GloAbstractBaseLot.h:49
EnSeekMode
Definition GloTypes.h:173
Structure to collect indexes from the schema file until the end of reading.
Definition GloSchemaInterface.h:117
std::string m_sIndexPath
Definition GloSchemaInterface.h:152
int m_iSignificantCharacter
Definition GloSchemaInterface.h:163
ClassInfoIndex * m_pClassInfoIndex
Definition GloSchemaInterface.h:129
bool m_bAccepted
Definition GloSchemaInterface.h:140
TempGloClassInfoIndex(ClassInfoIndex *pClassInfoIndex, const std::string &rsIndexPath, int iSignificantCharacter)