GlobalObjects
Loading...
Searching...
No Matches
GloBaseMaker.h
Go to the documentation of this file.
1#ifndef INC_GLOBASEMAKER_H
2#define INC_GLOBASEMAKER_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include <string>
45#include "GloTypes.h"
46#include "GloSchemaInterface.h"
47#include "EuFileHelper.h"
48//-----------------------------------------------------------------------------
49namespace glo
50{
51 //---------------------------------------------------------------------------
52 #ifdef _MSC_VER
53 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
54 #pragma warning( disable : 4251 )
55 #endif
56 //---------------------------------------------------------------------------
79 {
80 private:
81 //============== Typedefs ===========
82 //-----------------------------------------------------------------------
116 typedef int (BaseMaker::*CREATE_FUNCPTR)( const std::string & rstrTargetPath,
117 const ClassInfo & rClassInfo,
118 bool bCreateNew ) const;
119 //-----------------------------------------------------------------------
150 typedef int (BaseMaker::*UPDATE_FUNCPTR)( const std::string & rstrTargetPath,
151 const ClassInfo & rClassInfo ) const;
152 //-----------------------------------------------------------------------
153
154 //============== Attribute
155 //-----------------------------------------------------------------------
167 std::shared_ptr< SchemaInterface > m_spSchemaInterface;
168 //-----------------------------------------------------------------------
183 //-----------------------------------------------------------------------
196 //-----------------------------------------------------------------------
209 //-----------------------------------------------------------------------
222 //-----------------------------------------------------------------------
235 //-----------------------------------------------------------------------
245 std::string m_strOutputLine;
246 //-----------------------------------------------------------------------
256 std::string m_strDokuLine;
257 //-----------------------------------------------------------------------
268 //-----------------------------------------------------------------------
278 std::string m_strDokuStarLine;
279 //-----------------------------------------------------------------------
290 //-----------------------------------------------------------------------
291
292 public:
293 //============== Konstruktoren
294 //-----------------------------------------------------------------------
305 //-----------------------------------------------------------------------
325 BaseMaker( const std::string & rstrSchemaFullName );
326 //-----------------------------------------------------------------------
338 BaseMaker( const SchemaInterface & rSchemaInterface );
339 //-----------------------------------------------------------------------
351 virtual ~BaseMaker();
352 //-----------------------------------------------------------------------
353
354 private:
355 //============== Konstruktoren
356 //-----------------------------------------------------------------------
367 //-----------------------------------------------------------------------
368
369 public:
370 //============== Init-Methoden
371 //-----------------------------------------------------------------------
381 void init();
382 //-----------------------------------------------------------------------
403 void setSchema( const std::string & rstrSchemaFullName );
404 //-----------------------------------------------------------------------
420 void setSchema( const SchemaInterface & rSchemaInterface );
421 //-----------------------------------------------------------------------
435 void setCommentBlockStartExt( const std::string & rstrCommentBlockStartExt );
436 //-----------------------------------------------------------------------
451 //-----------------------------------------------------------------------
463 void setTextBeforeKeywordPersistent( const std::string & rstrBeforeKeywordPersistent );
464 //-----------------------------------------------------------------------
477 //-----------------------------------------------------------------------
489 void setTextBehindKeywordPersistent( const std::string & rstrBehindKeywordPersistent );
490 //-----------------------------------------------------------------------
503 //-----------------------------------------------------------------------
515 void setTextBeforeKeywordTransient( const std::string & rstrBeforeKeywordTransient );
516 //-----------------------------------------------------------------------
529 //-----------------------------------------------------------------------
541 void setTextBehindKeywordTransient( const std::string & rstrBehindKeywordTransient );
542 //-----------------------------------------------------------------------
555 //-----------------------------------------------------------------------
556
557 //============== Generierungs Methoden
558 //-----------------------------------------------------------------------
583 int generateAllTables( const std::string & rstrTargetTablePath,
584 bool bCreateAllNew = false ) const;
585 //-----------------------------------------------------------------------
608 int writeTable( const std::string & rstrTargetTablePath,
609 const ClassInfo & rClassInfo,
610 bool bCreateNew ) const;
611 //-----------------------------------------------------------------------
635 int generateAllHeader( const std::string & rstrTargetHeaderPath,
636 bool bCreateAllNew) const;
637 //-----------------------------------------------------------------------
665 int generateHeader( const std::string & rstrTargetHeaderPath,
666 const ClassInfo & rClassInfo,
667 bool bCreateNew ) const;
668 //-----------------------------------------------------------------------
690 int updateAllHeader( const std::string & rstrTargetHeaderPath ) const;
691 //-----------------------------------------------------------------------
714 int updateHeader( const std::string & rstrTargetHeaderPath,
715 const ClassInfo & rClassInfo ) const;
716 //-----------------------------------------------------------------------
740 int generateAllSource( const std::string & rstrTargetSourcePath,
741 bool bCreateAllNew ) const;
742 //-----------------------------------------------------------------------
770 int generateSource( const std::string & rstrTargetSourcePath,
771 const ClassInfo & rClassInfo,
772 bool bCreateNew ) const;
773 //-----------------------------------------------------------------------
794 int updateAllSource( const std::string & rstrTargetSourcePath ) const;
795 //-----------------------------------------------------------------------
818 int updateSource( const std::string & rstrTargetSourcePath,
819 const ClassInfo & rClassInfo ) const;
820 //-----------------------------------------------------------------------
842 int generateObjCreator( const std::string & rstrTargetPath, bool bCreateNew ) const;
843 //-----------------------------------------------------------------------
859 int createIndex() const;
860 //-----------------------------------------------------------------------
861
862 //============== Prüf Methoden
863 //-----------------------------------------------------------------------
885 //-----------------------------------------------------------------------
902 int checkClassAttributes( const ClassInfo & rClassInfo ) const;
903 //-----------------------------------------------------------------------
922 int checkClassIndices( const ClassInfo & rClassInfo ) const;
923 //-----------------------------------------------------------------------
924
925 //============== Einschub-Methoden
926 //-----------------------------------------------------------------------
940 virtual void outputMsg( const std::string & rstrOutput ) const;
941 //-----------------------------------------------------------------------
959 virtual std::string getFileDescription( const ClassInfo & rClassInfo ) const;
960 //-----------------------------------------------------------------------
978 virtual std::string getClassDescription( const ClassInfo & rClassInfo ) const;
979 //-----------------------------------------------------------------------
997 virtual std::string getAttributeDescription( const ClassInfoAttribute & rClassInfoAttribute ) const;
998 //-----------------------------------------------------------------------
1016 virtual std::string getIndexDescription( const ClassInfoIndex & rClassInfoIndex ) const;
1017 //-----------------------------------------------------------------------
1018
1019 protected:
1020 //============== Methoden
1021 //-----------------------------------------------------------------------
1048 int generateAllX( CREATE_FUNCPTR pMemberFunction,
1049 const std::string & rstrTargetPath,
1050 bool bCreateAllNew ) const;
1051 //-----------------------------------------------------------------------
1072 int updateAllX( UPDATE_FUNCPTR pMemberFunction,
1073 const std::string & rstrTargetPath ) const;
1074 //-----------------------------------------------------------------------
1116 std::string getCreationNote( bool bWithWarning = true ) const;
1117 //-----------------------------------------------------------------------
1118
1119 private:
1120 //============== Operatoren
1121 //-----------------------------------------------------------------------
1131 inline BaseMaker & operator= ( const BaseMaker & );
1132 //-----------------------------------------------------------------------
1133 };
1134 //---------------------------------------------------------------------------
1135 #ifdef _MSC_VER
1136 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
1137 #pragma warning( default : 4251 )
1138 #endif
1139 //---------------------------------------------------------------------------
1140} // namespace glo
1141#endif
Header for FileHelper
Header for SchemaInterface
For each library, here 'GlobalObjects' there is a type file.
#define __glo_export_dll
Definition GloTypes.h:70
Generated using the SchemaInterface, data tables, C++ header and source files etc....
Definition GloBaseMaker.h:79
int updateHeader(const std::string &rstrTargetHeaderPath, const ClassInfo &rClassInfo) const
void setTextBeforeKeywordPersistent(const std::string &rstrBeforeKeywordPersistent)
std::shared_ptr< SchemaInterface > m_spSchemaInterface
Definition GloBaseMaker.h:167
void setSchema(const std::string &rstrSchemaFullName)
virtual std::string getAttributeDescription(const ClassInfoAttribute &rClassInfoAttribute) const
int checkAllClassReferences() const
int generateHeader(const std::string &rstrTargetHeaderPath, const ClassInfo &rClassInfo, bool bCreateNew) const
std::string m_strDokuLine
Definition GloBaseMaker.h:256
void setCommentBlockStartExt(const std::string &rstrCommentBlockStartExt)
int writeTable(const std::string &rstrTargetTablePath, const ClassInfo &rClassInfo, bool bCreateNew) const
std::string m_strOutputLine
Definition GloBaseMaker.h:245
void setTextBeforeKeywordTransient(const std::string &rstrBeforeKeywordTransient)
std::string m_strDokuAttributLine
Definition GloBaseMaker.h:289
virtual std::string getClassDescription(const ClassInfo &rClassInfo) const
int updateAllHeader(const std::string &rstrTargetHeaderPath) const
std::string getTextBeforeKeywordPersistent()
int updateAllSource(const std::string &rstrTargetSourcePath) const
std::string getCommentBlockStartExt()
int generateSource(const std::string &rstrTargetSourcePath, const ClassInfo &rClassInfo, bool bCreateNew) const
int generateObjCreator(const std::string &rstrTargetPath, bool bCreateNew) const
int generateAllTables(const std::string &rstrTargetTablePath, bool bCreateAllNew=false) const
int createIndex() const
std::string m_strCommentBlockStartExt
Definition GloBaseMaker.h:182
BaseMaker(const std::string &rstrSchemaFullName)
int updateSource(const std::string &rstrTargetSourcePath, const ClassInfo &rClassInfo) const
void setTextBehindKeywordPersistent(const std::string &rstrBehindKeywordPersistent)
void setTextBehindKeywordTransient(const std::string &rstrBehindKeywordTransient)
std::string m_strBehindKeywordPersistent
Definition GloBaseMaker.h:208
std::string getCreationNote(bool bWithWarning=true) const
std::string getTextBehindKeywordTransient()
int checkClassAttributes(const ClassInfo &rClassInfo) const
int updateAllX(UPDATE_FUNCPTR pMemberFunction, const std::string &rstrTargetPath) const
std::string m_strDokuStarLine
Definition GloBaseMaker.h:278
std::string getTextBeforeKeywordTransient()
std::string m_strBehindKeywordTransient
Definition GloBaseMaker.h:234
BaseMaker(const BaseMaker &)
int generateAllSource(const std::string &rstrTargetSourcePath, bool bCreateAllNew) const
std::string m_strBeforeKeywordTransient
Definition GloBaseMaker.h:221
int generateAllX(CREATE_FUNCPTR pMemberFunction, const std::string &rstrTargetPath, bool bCreateAllNew) const
virtual void outputMsg(const std::string &rstrOutput) const
void setSchema(const SchemaInterface &rSchemaInterface)
int checkClassIndices(const ClassInfo &rClassInfo) const
int generateAllHeader(const std::string &rstrTargetHeaderPath, bool bCreateAllNew) const
BaseMaker(const SchemaInterface &rSchemaInterface)
std::string m_strBeforeKeywordPersistent
Definition GloBaseMaker.h:195
virtual ~BaseMaker()
virtual std::string getFileDescription(const ClassInfo &rClassInfo) const
std::string getTextBehindKeywordPersistent()
std::string m_strDokuCrossLine
Definition GloBaseMaker.h:267
virtual std::string getIndexDescription(const ClassInfoIndex &rClassInfoIndex) const
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
This class is the interface to a GlobalObjects schema. It contains all class information to store obj...
Definition GloSchemaInterface.h:91
Definition GloAbstractBaseLot.h:49