GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloClassInfo.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLOCLASSINFO_H
2#define INC_GLOCLASSINFO_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include <string>
45#include <list>
46#include <set>
47#include <vector>
48#include <map>
49#include <memory>
50#include "GloTypes.h"
51//-----------------------------------------------------------------------------
52namespace glo
53{
54 //---------------------------------------------------------------------------
55 /* Forwards */
56 class ClassInfoAttribute;
57 class ClassInfoIndex;
58 class AttributeID;
59 class AllSetIndexInfo;
60 //---------------------------------------------------------------------------
61 #ifdef _MSC_VER
62 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
63 #pragma warning( disable : 4251 )
64 #endif
65 //---------------------------------------------------------------------------
86 {
87 private:
88 //============== Friends
89 //-----------------------------------------------------------------------
90 friend class SchemaInterface;
91 //-----------------------------------------------------------------------
92
93 public:
94 //-----------------------------------------------------------------------
95 // >>>>>>>>>>>>>>>>>>>> SuperClassIdInfoTuple >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
96 //-----------------------------------------------------------------------
112 {
113 private:
114 //============== Attribute
115 //---------------------------------------------------------------------
125 unsigned long m_ulClassID;
126 //---------------------------------------------------------------------
136 std::string m_sSuperClassInfo;
137 //---------------------------------------------------------------------
138
139 public:
140 //============== Konstruktoren
141 //---------------------------------------------------------------------
152 //---------------------------------------------------------------------
164 SuperClassIdInfoTuple( unsigned long ulClassID );
165 //---------------------------------------------------------------------
177 SuperClassIdInfoTuple( const std::string & rsSuperClassInfo );
178 //---------------------------------------------------------------------
192 SuperClassIdInfoTuple( unsigned long ulClassID,
193 const std::string & rsSuperClassInfo );
194 //---------------------------------------------------------------------
207 //---------------------------------------------------------------------
218 //---------------------------------------------------------------------
219
220 //============== Methoden
221 //---------------------------------------------------------------------
233 void setClassID (unsigned long ulClassID);
234 //---------------------------------------------------------------------
246 unsigned long getClassID ();
247 //---------------------------------------------------------------------
259 void setSuperClassInfo (const std::string & rsSuperClassInfo);
260 //---------------------------------------------------------------------
272 std::string getSuperClassInfo () const;
273 //---------------------------------------------------------------------
274
275 //---------------------------------------------------------------------
277
288 bool operator== ( SuperClassIdInfoTuple & rT ) const;
289 bool operator!= ( SuperClassIdInfoTuple & rT ) const;
291 //---------------------------------------------------------------------
304 //---------------------------------------------------------------------
305 };
306 //-----------------------------------------------------------------------
307 // <<<<<<<<<<<<<<<<<<<<< SuperClassIdInfoTuple <<<<<<<<<<<<<<<<<<<<<<<<<<<<
308 //-----------------------------------------------------------------------
309
310 private:
311 //============== Attributes
312 //-----------------------------------------------------------------------
322 std::string m_sName;
323 //-----------------------------------------------------------------------
333 std::string m_sSchemaName;
334 //-----------------------------------------------------------------------
344 unsigned long m_ulClassID;
345 //-----------------------------------------------------------------------
357 std::string m_sSuperClasses;
358 //-----------------------------------------------------------------------
375 //-----------------------------------------------------------------------
385 std::list< ClassInfoAttribute *> m_AttributeList;
386 //-----------------------------------------------------------------------
396 std::list< ClassInfoAttribute * >::iterator m_AttributeListIterator;
397 //-----------------------------------------------------------------------
407 std::list<ClassInfoIndex *> m_IndexList;
408 //-----------------------------------------------------------------------
418 std::list< ClassInfoIndex * >::iterator m_IndexListIterator;
419 //-----------------------------------------------------------------------
433 std::list<ClassInfo *> m_SubClassInfoList;
434 //-----------------------------------------------------------------------
435
436 //============== Developer attributes
437 //-----------------------------------------------------------------------
451 std::string m_sFileName;
452 //-----------------------------------------------------------------------
468 //-----------------------------------------------------------------------
484 //-----------------------------------------------------------------------
499 std::string m_sClassModifier;
500 //-----------------------------------------------------------------------
501
502 public:
503 //============= constructors
504 //-----------------------------------------------------------------------
515 //-----------------------------------------------------------------------
539 ClassInfo( const std::string & rsSchemaName,
540 const std::string & rsName,
541 unsigned long ulClassID,
542 const std::string & rsSuperClasses,
543 const std::string & rsSuperClassesInfo );
544 //-----------------------------------------------------------------------
558 ClassInfo (const ClassInfo & rT);
559 //-----------------------------------------------------------------------
569 virtual ~ClassInfo();
570 //-----------------------------------------------------------------------
571
572 //============== methods
573 //-----------------------------------------------------------------------
586 void setSchemaName( const std::string & rsSchemaName );
587 //-----------------------------------------------------------------------
598 std::string getSchemaName() const;
599 //-----------------------------------------------------------------------
620 void setName( const std::string & rsName );
621 //-----------------------------------------------------------------------
640 std::string getName() const;
641 //-----------------------------------------------------------------------
653 std::string getClassName() const;
654 //-----------------------------------------------------------------------
670 void getNamespaces( std::vector<std::string> & rNamespaces ) const;
671 //-----------------------------------------------------------------------
684 void setClassID( unsigned long ulClassID );
685 //-----------------------------------------------------------------------
696 unsigned long getClassID() const;
697 //-----------------------------------------------------------------------
698
699 //============== superclass methods
700 //-----------------------------------------------------------------------
715 void setSuperClasses( const std::string & rsSuperClasses );
716 //-----------------------------------------------------------------------
731 std::string getSuperClasses() const;
732 //-----------------------------------------------------------------------
752 void setSuperClassesInfo( const std::string & rsSuperClassesInfo );
753 //-----------------------------------------------------------------------
772 std::string getSuperClassesInfo() const;
773 //-----------------------------------------------------------------------
789 bool isDirectSubclassOf( unsigned long ulSuperClassID ) const;
790 //-----------------------------------------------------------------------
806 void getSuperClasses( std::vector<unsigned long> & rSuperClassIdVector ) const;
807 //-----------------------------------------------------------------------
824 void getSuperClassesInfo( std::vector<std::string> & rSuperClassesInfoVector ) const;
825 //-----------------------------------------------------------------------
843 void getSuperClassesInfoTuples( std::vector< std::shared_ptr<SuperClassIdInfoTuple> > & rSuperClassesInfoTuplesVector ) const;
844 //-----------------------------------------------------------------------
858 void setSuperClassesInfoTuples( const std::vector< std::shared_ptr<SuperClassIdInfoTuple> > & rSuperClassesInfoTuplesVector );
859 //-----------------------------------------------------------------------
860
861 //============== Attribut-Methoden
862 //-----------------------------------------------------------------------
889 //-----------------------------------------------------------------------
931 //-----------------------------------------------------------------------
941 std::size_t getNumberOfAttributes() const;
942 //-----------------------------------------------------------------------
964 ClassInfoAttribute * getAttributeByName( const std::string & rsName ) const;
965 //-----------------------------------------------------------------------
993 ClassInfoAttribute * getAttributeByFieldName( const std::string & rsTableName,
994 const std::string & rsFieldName ) const;
995 //-----------------------------------------------------------------------
1017 ClassInfoAttribute * getAttributeByID( const AttributeID & rAttributeID ) const;
1018 //-----------------------------------------------------------------------
1039 bool attributeExisting( ClassInfoAttribute * pAttribute ) const;
1040 //-----------------------------------------------------------------------
1061 bool attributeExisting( const std::string & rsAttributeName ) const;
1062 //-----------------------------------------------------------------------
1082 int attributeFieldNameExisting (const std::string & rsAttributeFieldName);
1083 //-----------------------------------------------------------------------
1112 int removeAttribute( ClassInfoAttribute * pAttribute, bool bDelete = false );
1113 //-----------------------------------------------------------------------
1126 //-----------------------------------------------------------------------
1140 std::string getTableNameFirstAttribute() const;
1141 //-----------------------------------------------------------------------
1161 void getAllClassMemberNamesSortByID( std::map< AttributeID, std::string> & rRetValMap ) const;
1162 //-----------------------------------------------------------------------
1179 std::less<int> > & rRetValMap ) const;
1180 //-----------------------------------------------------------------------
1198 std::string getAllAttributeFildNamesAsColumnRow( char cColumnDelimiter = g_cTableColumnDelimiter ) const;
1199 //-----------------------------------------------------------------------
1213 void setAllAttributesTableName( const std::string & rsTableName ) const;
1214 //-----------------------------------------------------------------------
1215
1216 //============== Index-Methoden
1217 //-----------------------------------------------------------------------
1241 //-----------------------------------------------------------------------
1280 //-----------------------------------------------------------------------
1290 std::size_t getNumberOfIndexes() const;
1291 //-----------------------------------------------------------------------
1311 ClassInfoIndex * getIndexFromName( const std::string & rsIndexName ) const;
1312 //-----------------------------------------------------------------------
1328 void getIndexes( std::vector< AllSetIndexInfo > & rIndexes ) const;
1329 //-----------------------------------------------------------------------
1350 int indexExisting( ClassInfoIndex * pIndex ) const;
1351 //-----------------------------------------------------------------------
1371 int indexExisting( const std::string & rsIndexName ) const;
1372 //-----------------------------------------------------------------------
1400 int removeIndex( ClassInfoIndex * pIndex, bool bDelete = false );
1401 //-----------------------------------------------------------------------
1414 //-----------------------------------------------------------------------
1415
1416 //============== SubClass Methoden
1417 //-----------------------------------------------------------------------
1439 bool asSubClassAvailable( unsigned long ulSubClassID ) const;
1440 //-----------------------------------------------------------------------
1458 void insertSubClassInfo( ClassInfo * pSubClassInfo );
1459 //-----------------------------------------------------------------------
1477 std::list< ClassInfo * > & getSubClassInfos();
1478 //-----------------------------------------------------------------------
1492 void removeSubClassInfo( unsigned long ulClassID );
1493 //-----------------------------------------------------------------------
1494
1495 //============== Developer Methoden
1496 //-----------------------------------------------------------------------
1514 void setFileName( const std::string & rsFileName );
1515 //-----------------------------------------------------------------------
1533 std::string getFileName() const;
1534 //-----------------------------------------------------------------------
1552 void setFileDescription( const std::string & rstrFileDescription );
1553 //-----------------------------------------------------------------------
1571 std::string getFileDescription() const;
1572 //-----------------------------------------------------------------------
1590 void setClassDescription( const std::string & rstrClassDescription );
1591 //-----------------------------------------------------------------------
1609 std::string getClassDescription() const;
1610 //-----------------------------------------------------------------------
1629 void setClassModifier( const std::string & rstrClassModifier );
1630 //-----------------------------------------------------------------------
1650 std::string getClassModifier() const;
1651 //-----------------------------------------------------------------------
1652
1653 private:
1654 //============== Methoden
1655 //-----------------------------------------------------------------------
1670 //-----------------------------------------------------------------------
1684 void copyIndexListFrom( const ClassInfo & rT );
1685 //-----------------------------------------------------------------------
1686
1687 public:
1688 //============== Debug-Methoden
1689 //-----------------------------------------------------------------------
1690 #ifdef _DEBUG
1700 std::string _DEBUG_ToString();
1701 #endif
1702 //-----------------------------------------------------------------------
1703
1704 //============== Operatoren
1705 //-----------------------------------------------------------------------
1718 ClassInfo & operator= ( const ClassInfo & rT );
1719 //-----------------------------------------------------------------------
1720 };
1721 //---------------------------------------------------------------------------
1722 #ifdef _MSC_VER
1723 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
1724 #pragma warning( default : 4251 )
1725 #endif
1726 //---------------------------------------------------------------------------
1727} // namespace glo
1728#endif
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:70
Diese Klasse spiegelt eine eindeutige ID eines Klasseninformations-Attributes wieder.
Definition GloAttributeID.h:81
Diese Parameterklasse wird genutzt, um die Superklassen-IDs mit einer zusätzlichen Infos zu liefern u...
Definition GloClassInfo.h:112
SuperClassIdInfoTuple(const std::string &rsSuperClassInfo)
SuperClassIdInfoTuple(unsigned long ulClassID)
SuperClassIdInfoTuple(const SuperClassIdInfoTuple &rT)
void setSuperClassInfo(const std::string &rsSuperClassInfo)
std::string m_sSuperClassInfo
Definition GloClassInfo.h:136
unsigned long m_ulClassID
Definition GloClassInfo.h:125
SuperClassIdInfoTuple(unsigned long ulClassID, const std::string &rsSuperClassInfo)
void setClassID(unsigned long ulClassID)
In Objekten dieser Klasse sind die Information für GlobalObjects, wie ein persistentes Klassenattribu...
Definition GloClassInfoAttribute.h:83
Diese Klasse beinhaltet alle Informationen um Objekte einer Klasse in einer Datenbank speichern zu kö...
Definition GloClassInfo.h:86
void getSuperClassesInfoTuples(std::vector< std::shared_ptr< SuperClassIdInfoTuple > > &rSuperClassesInfoTuplesVector) const
void setSuperClassesInfo(const std::string &rsSuperClassesInfo)
int indexExisting(ClassInfoIndex *pIndex) const
void deleteAllInfoAttributes()
std::string getSuperClassesInfo() const
std::size_t getNumberOfAttributes() const
void getAllAttributesSortByFieldPos(std::map< int, ClassInfoAttribute *, std::less< int > > &rRetValMap) const
void removeSubClassInfo(unsigned long ulClassID)
ClassInfoIndex * getIndex(EnSeekMode eMode)
std::size_t getNumberOfIndexes() const
int attributeFieldNameExisting(const std::string &rsAttributeFieldName)
void setSuperClasses(const std::string &rsSuperClasses)
std::string _DEBUG_ToString()
std::string m_sSchemaName
Definition GloClassInfo.h:333
bool attributeExisting(ClassInfoAttribute *pAttribute) const
void deleteAllInfoIndexes()
bool asSubClassAvailable(unsigned long ulSubClassID) const
int removeIndex(ClassInfoIndex *pIndex, bool bDelete=false)
unsigned long getClassID() const
bool attributeExisting(const std::string &rsAttributeName) const
void setClassModifier(const std::string &rstrClassModifier)
void setSuperClassesInfoTuples(const std::vector< std::shared_ptr< SuperClassIdInfoTuple > > &rSuperClassesInfoTuplesVector)
void setName(const std::string &rsName)
unsigned long m_ulClassID
Definition GloClassInfo.h:344
void setFileDescription(const std::string &rstrFileDescription)
void getNamespaces(std::vector< std::string > &rNamespaces) const
std::string getFileDescription() const
std::list< ClassInfoAttribute * > m_AttributeList
Definition GloClassInfo.h:385
ClassInfo(const ClassInfo &rT)
std::string getAllAttributeFildNamesAsColumnRow(char cColumnDelimiter=g_cTableColumnDelimiter) const
ClassInfoAttribute * getAttributeByName(const std::string &rsName) const
void getSuperClasses(std::vector< unsigned long > &rSuperClassIdVector) const
void setAllAttributesTableName(const std::string &rsTableName) const
bool isDirectSubclassOf(unsigned long ulSuperClassID) const
ClassInfoAttribute * getAttributeByID(const AttributeID &rAttributeID) const
std::string getClassName() const
void getAllClassMemberNamesSortByID(std::map< AttributeID, std::string > &rRetValMap) const
std::string getName() const
void copyIndexListFrom(const ClassInfo &rT)
void getIndexes(std::vector< AllSetIndexInfo > &rIndexes) const
std::list< ClassInfoIndex * > m_IndexList
Definition GloClassInfo.h:407
void getSuperClassesInfo(std::vector< std::string > &rSuperClassesInfoVector) const
std::list< ClassInfoAttribute * >::iterator m_AttributeListIterator
Definition GloClassInfo.h:396
virtual ~ClassInfo()
std::string m_sFileDescription
Definition GloClassInfo.h:467
std::string getFileName() const
ClassInfoAttribute * getAttribute(EnSeekMode eMode)
std::string m_sSuperClasses
Definition GloClassInfo.h:357
std::string getClassModifier() const
std::string m_sName
Definition GloClassInfo.h:322
std::string getSchemaName() const
std::list< ClassInfo * > & getSubClassInfos()
std::list< ClassInfoIndex * >::iterator m_IndexListIterator
Definition GloClassInfo.h:418
int indexExisting(const std::string &rsIndexName) const
std::string m_sSuperClassesInfo
Definition GloClassInfo.h:374
std::string m_sFileName
Definition GloClassInfo.h:451
void setClassID(unsigned long ulClassID)
std::string m_sClassModifier
Definition GloClassInfo.h:499
std::list< ClassInfo * > m_SubClassInfoList
Definition GloClassInfo.h:433
int removeAttribute(ClassInfoAttribute *pAttribute, bool bDelete=false)
ClassInfoIndex * getIndexFromName(const std::string &rsIndexName) const
ClassInfoAttribute * getAttributeByFieldName(const std::string &rsTableName, const std::string &rsFieldName) const
int takeOverAttribute(ClassInfoAttribute *pAttribute)
void insertSubClassInfo(ClassInfo *pSubClassInfo)
int takeOverIndex(ClassInfoIndex *pIndex)
std::string getClassDescription() const
ClassInfo(const std::string &rsSchemaName, const std::string &rsName, unsigned long ulClassID, const std::string &rsSuperClasses, const std::string &rsSuperClassesInfo)
void copyAttributListFrom(const ClassInfo &rT)
void setFileName(const std::string &rsFileName)
void setClassDescription(const std::string &rstrClassDescription)
void setSchemaName(const std::string &rsSchemaName)
std::string getSuperClasses() const
std::string getTableNameFirstAttribute() const
std::string m_sClassDescription
Definition GloClassInfo.h:483
In Objekten dieser Klasse sind die Information für GlobalObjects, wie ein Index aufgebaut ist.
Definition GloClassInfoIndex.h:85
Diese Klasse ist die Schnittstelle zu einem GlobalObjects-Schema. Sie beinhaltet alle Klasseninformat...
Definition GloSchemaInterface.h:91
Definition GloAbstractBaseLot.h:49
EnSeekMode
Definition GloTypes.h:173