Generated using the SchemaInterface, data tables, C++ header and source files etc..
More...
#include <GloBaseMaker.h>
|
| BaseMaker () |
|
| BaseMaker (const SchemaInterface &rSchemaInterface) |
|
| BaseMaker (const std::string &rstrSchemaFullName) |
|
virtual | ~BaseMaker () |
|
int | checkAllClassReferences () const |
|
int | checkClassAttributes (const ClassInfo &rClassInfo) const |
|
int | checkClassIndices (const ClassInfo &rClassInfo) const |
|
int | createIndex () const |
|
int | generateAllHeader (const std::string &rstrTargetHeaderPath, bool bCreateAllNew) const |
|
int | generateAllSource (const std::string &rstrTargetSourcePath, bool bCreateAllNew) const |
|
int | generateAllTables (const std::string &rstrTargetTablePath, bool bCreateAllNew=false) const |
|
int | generateHeader (const std::string &rstrTargetHeaderPath, const ClassInfo &rClassInfo, bool bCreateNew) const |
|
int | generateObjCreator (const std::string &rstrTargetPath, bool bCreateNew) const |
|
int | generateSource (const std::string &rstrTargetSourcePath, const ClassInfo &rClassInfo, bool bCreateNew) const |
|
virtual std::string | getAttributeDescription (const ClassInfoAttribute &rClassInfoAttribute) const |
|
virtual std::string | getClassDescription (const ClassInfo &rClassInfo) const |
|
std::string | getCommentBlockStartExt () |
|
virtual std::string | getFileDescription (const ClassInfo &rClassInfo) const |
|
virtual std::string | getIndexDescription (const ClassInfoIndex &rClassInfoIndex) const |
|
std::string | getTextBeforeKeywordPersistent () |
|
std::string | getTextBeforeKeywordTransient () |
|
std::string | getTextBehindKeywordPersistent () |
|
std::string | getTextBehindKeywordTransient () |
|
void | init () |
|
virtual void | outputMsg (const std::string &rstrOutput) const |
|
void | setCommentBlockStartExt (const std::string &rstrCommentBlockStartExt) |
|
void | setSchema (const SchemaInterface &rSchemaInterface) |
|
void | setSchema (const std::string &rstrSchemaFullName) |
|
void | setTextBeforeKeywordPersistent (const std::string &rstrBeforeKeywordPersistent) |
|
void | setTextBeforeKeywordTransient (const std::string &rstrBeforeKeywordTransient) |
|
void | setTextBehindKeywordPersistent (const std::string &rstrBehindKeywordPersistent) |
|
void | setTextBehindKeywordTransient (const std::string &rstrBehindKeywordTransient) |
|
int | updateAllHeader (const std::string &rstrTargetHeaderPath) const |
|
int | updateAllSource (const std::string &rstrTargetSourcePath) const |
|
int | updateHeader (const std::string &rstrTargetHeaderPath, const ClassInfo &rClassInfo) const |
|
int | updateSource (const std::string &rstrTargetSourcePath, const ClassInfo &rClassInfo) const |
|
int | writeTable (const std::string &rstrTargetTablePath, const ClassInfo &rClassInfo, bool bCreateNew) const |
|
|
typedef int(BaseMaker::*) | CREATE_FUNCPTR(const std::string &rstrTargetPath, const ClassInfo &rClassInfo, bool bCreateNew) const |
|
typedef int(BaseMaker::*) | UPDATE_FUNCPTR(const std::string &rstrTargetPath, const ClassInfo &rClassInfo) const |
|
Generated using the SchemaInterface, data tables, C++ header and source files etc..
It can be derived from this class and e.g. not to output the information output in the BaseMaker::outputMsg() method via std::cout, but in another way in the subclass.
- Copyright
- © 2010 Helmut Jakoby
- Author
- Helmut Jakoby
◆ CREATE_FUNCPTR
int(BaseMaker::*) glo::BaseMaker::CREATE_FUNCPTR(const std::string &rstrTargetPath, const ClassInfo &rClassInfo, bool bCreateNew) const |
|
private |
This method type should be passed to method BaseMaker::generateAllX (...)const for editing.
- Parameters
-
[in] | rstrTargetPath | The path where the file is to be created, such as "C:/Path/include/" or "C:/Path/source/". |
[in] | rClassInfo | The class information with the necessary information. |
[in] | bCreateNew | If true, also an existing file is overwritten! |
- Returns
- A return value < 0 indicates an error.
- See also
- generateAllX(CREATE_FUNCPTR, const std::string&, bool)const
used in
◆ UPDATE_FUNCPTR
int(BaseMaker::*) glo::BaseMaker::UPDATE_FUNCPTR(const std::string &rstrTargetPath, const ClassInfo &rClassInfo) const |
|
private |
This method type should be passed to method BaseMaker::updateAllX (...)const for editing.
- Parameters
-
[in] | rstrTargetPath | The path in which the file is to be adapted, e.g. "C:/Path/include/" or "C:/Path/source/". |
[in] | rClassInfo | The class information with the necessary information. |
- Returns
- A return value < 0 indicates an error.
- See also
- updateAllX(UPDATE_FUNCPTR, const std::string&)const
used in
◆ BaseMaker() [1/4]
glo::BaseMaker::BaseMaker |
( |
| ) |
|
◆ BaseMaker() [2/4]
glo::BaseMaker::BaseMaker |
( |
const std::string & | rstrSchemaFullName | ) |
|
Constructor with parameter passing.
- Parameters
-
[in] | rstrSchemaFullName | The full file name of the schema; e.g. "C:/Path/MyGloBase.ini". |
- Exceptions
-
- Attention
- If the file exists, a SchemaInterface is instantiated in m_spSchemaInterface.
◆ BaseMaker() [3/4]
Constructor with parameter passing.
- Parameters
-
◆ ~BaseMaker()
virtual glo::BaseMaker::~BaseMaker |
( |
| ) |
|
|
virtual |
◆ BaseMaker() [4/4]
glo::BaseMaker::BaseMaker |
( |
const BaseMaker & | | ) |
|
|
private |
The copy constructor is not available.
◆ checkAllClassReferences()
int glo::BaseMaker::checkAllClassReferences |
( |
| ) |
const |
◆ checkClassAttributes()
int glo::BaseMaker::checkClassAttributes |
( |
const ClassInfo & | rClassInfo | ) |
const |
All reference attributes of the transferred class information are checked for the presence of the referenced class information.
The results are output via outputMsg(const std::string&)const.
- Returns
- A return value < 0 indicates an error.
◆ checkClassIndices()
int glo::BaseMaker::checkClassIndices |
( |
const ClassInfo & | rClassInfo | ) |
const |
All indexes of the transferred class information are checked for the presence of the referenced class information and class information attributes.
The results are output via outputMsg(const std::string&)const.
- Returns
- A return value < 0 indicates an error.
◆ createIndex()
int glo::BaseMaker::createIndex |
( |
| ) |
const |
◆ generateAllHeader()
int glo::BaseMaker::generateAllHeader |
( |
const std::string & | rstrTargetHeaderPath, |
|
|
bool | bCreateAllNew ) const |
The individual header files are created in the transferred directory.
Passes generateHeader (...) to generateAllX (...).
- Parameters
-
[in] | rstrTargetHeaderPath | The path in which the header files are to be created such as "C:/Path/include/". |
[in] | bCreateAllNew | If true, existing files are overwritten, otherwise not. |
- Returns
- A return value < 0 indicates an error.
◆ generateAllSource()
int glo::BaseMaker::generateAllSource |
( |
const std::string & | rstrTargetSourcePath, |
|
|
bool | bCreateAllNew ) const |
The individual source files are created in the passed directory.
Passes generateSource (...) to generateAllX (...).
- Parameters
-
[in] | rstrTargetSourcePath | The path in which the source files are to be created such as "C:/Path/source/". |
[in] | bCreateAllNew | If true, existing files are overwritten, otherwise not. |
- Returns
- A return value < 0 indicates an error.
◆ generateAllTables()
int glo::BaseMaker::generateAllTables |
( |
const std::string & | rstrTargetTablePath, |
|
|
bool | bCreateAllNew = false ) const |
The individual table files are created in the passed directory.
Passes writeTable (...) to generateAllX (...).
- Parameters
-
[in] | rstrTargetTablePath | The path in which the tables are to be created, e.g. "C:/Path/Data/". |
[in] | bCreateAllNew | If true, existing files are overwritten, otherwise not. |
- Returns
- A return value < 0 indicates an error.
◆ generateAllX()
int glo::BaseMaker::generateAllX |
( |
CREATE_FUNCPTR | pMemberFunction, |
|
|
const std::string & | rstrTargetPath, |
|
|
bool | bCreateAllNew ) const |
|
protected |
◆ generateHeader()
int glo::BaseMaker::generateHeader |
( |
const std::string & | rstrTargetHeaderPath, |
|
|
const ClassInfo & | rClassInfo, |
|
|
bool | bCreateNew ) const |
A header file of a class information is created in the transferred directory.
The file and class name and the individual attribute and method names are determined from the class information.
- Parameters
-
[in] | rstrTargetHeaderPath | The path in which the header file is to be created, e.g. "C:/Path/include/". |
[in] | rClassInfo | The class information with the necessary information. |
[in] | bCreateNew | If true, an existing file is overwritten, otherwise not. |
- Returns
- A return value < 0 indicates an error.
◆ generateObjCreator()
int glo::BaseMaker::generateObjCreator |
( |
const std::string & | rstrTargetPath, |
|
|
bool | bCreateNew ) const |
Generates the specific ObjCreator in the passed directory. The name consists of the schema name plus "ObjCreator.h" (e.g. "MyBaseObjCreator.h").
- Parameters
-
[in] | rstrTargetPath | The path in which the header file is to be created |
[in] | bCreateNew | If true, an existing file is overwritten, otherwise not. |
- Returns
- A return value < 0 indicates an error.
◆ generateSource()
int glo::BaseMaker::generateSource |
( |
const std::string & | rstrTargetSourcePath, |
|
|
const ClassInfo & | rClassInfo, |
|
|
bool | bCreateNew ) const |
A source file of a class information is created in the transferred directory.
The file and class name and the individual attribute and method names are determined from the class information.
- Parameters
-
[in] | rstrTargetSourcePath | The path in which the source file is to be created, e.g. "C:/Path/source/". |
[in] | rClassInfo | The class information with the necessary information. |
[in] | bCreateNew | If true, an existing file is overwritten, otherwise not. |
- Returns
- A return value < 0 indicates an error.
◆ getAttributeDescription()
virtual std::string glo::BaseMaker::getAttributeDescription |
( |
const ClassInfoAttribute & | rClassInfoAttribute | ) |
const |
|
virtual |
Returns the attribute description which should be written into a header file of a class attribute declaration. Can be overwritten to make changes to the class attribute description if necessary.
- Parameters
-
[in] | rClassInfoAttribute | The class information attribute whose description is to be delivered. |
◆ getClassDescription()
virtual std::string glo::BaseMaker::getClassDescription |
( |
const ClassInfo & | rClassInfo | ) |
const |
|
virtual |
Returns the class description which should be written into a header file of a class declaration. Can be overwritten to make changes to the class description if necessary.
- Parameters
-
[in] | rClassInfo | The class information whose class description is to be delivered. |
◆ getCommentBlockStartExt()
std::string glo::BaseMaker::getCommentBlockStartExt |
( |
| ) |
|
Returns the string to which the comment block introductory character is appended.
- Returns
- The string to be attached.
◆ getCreationNote()
std::string glo::BaseMaker::getCreationNote |
( |
bool | bWithWarning = true | ) |
const |
|
protected |
Returns the creation note that will be inserted into each created file at the beginning as a comment.
- Parameters
-
[in] | bWithWarning | If true (default) an additional warning is written. |
- Returns
- See above.
◆ getFileDescription()
virtual std::string glo::BaseMaker::getFileDescription |
( |
const ClassInfo & | rClassInfo | ) |
const |
|
virtual |
Returns the file description which should be written into a header file of a class declaration. Can be overwritten to make changes to the file description if necessary.
- Parameters
-
[in] | rClassInfo | The class information whose file description is to be delivered. |
◆ getIndexDescription()
virtual std::string glo::BaseMaker::getIndexDescription |
( |
const ClassInfoIndex & | rClassInfoIndex | ) |
const |
|
virtual |
Returns the index description to be written into a header file of a class index declaration. Can be overwritten to make changes to the class index description if necessary.
- Parameters
-
[in] | rClassInfoIndex | The class information index whose description is to be delivered. |
◆ getTextBeforeKeywordPersistent()
std::string glo::BaseMaker::getTextBeforeKeywordPersistent |
( |
| ) |
|
◆ getTextBeforeKeywordTransient()
std::string glo::BaseMaker::getTextBeforeKeywordTransient |
( |
| ) |
|
◆ getTextBehindKeywordPersistent()
std::string glo::BaseMaker::getTextBehindKeywordPersistent |
( |
| ) |
|
◆ getTextBehindKeywordTransient()
std::string glo::BaseMaker::getTextBehindKeywordTransient |
( |
| ) |
|
◆ init()
void glo::BaseMaker::init |
( |
| ) |
|
Sets the string attributes.
◆ operator=()
The assignment operator is not available.
◆ outputMsg()
virtual void glo::BaseMaker::outputMsg |
( |
const std::string & | rstrOutput | ) |
const |
|
virtual |
Here the single steps of the individual tasks are output via std::cout. Can be overwritten to redirect the output (e.g. to a window).
- Parameters
-
[in] | rstrOutput | The information to be output. |
◆ setCommentBlockStartExt()
void glo::BaseMaker::setCommentBlockStartExt |
( |
const std::string & | rstrCommentBlockStartExt | ) |
|
Sets the string to which the comment block introductory character is appended.
- Parameters
-
[in] | rstrCommentBlockStartExt | The string to be added. |
◆ setSchema() [1/2]
Sets the GloSchema interface.
- Parameters
-
- Attention
- A possibly previously existing GloSchema interface is removed from the memory.
◆ setSchema() [2/2]
void glo::BaseMaker::setSchema |
( |
const std::string & | rstrSchemaFullName | ) |
|
Sets the GloSchema interface.
- Parameters
-
[in] | rstrSchemaFullName | The full file name of the schema; e.g. "C:/Path/MyGloBase.ini". |
- Exceptions
-
- Attention
- If the file exists, a SchemaInterface is instantiated. A possibly previously existing GloSchema interface is removed from memory.
◆ setTextBeforeKeywordPersistent()
void glo::BaseMaker::setTextBeforeKeywordPersistent |
( |
const std::string & | rstrBeforeKeywordPersistent | ) |
|
◆ setTextBeforeKeywordTransient()
void glo::BaseMaker::setTextBeforeKeywordTransient |
( |
const std::string & | rstrBeforeKeywordTransient | ) |
|
◆ setTextBehindKeywordPersistent()
void glo::BaseMaker::setTextBehindKeywordPersistent |
( |
const std::string & | rstrBehindKeywordPersistent | ) |
|
◆ setTextBehindKeywordTransient()
void glo::BaseMaker::setTextBehindKeywordTransient |
( |
const std::string & | rstrBehindKeywordTransient | ) |
|
◆ updateAllHeader()
int glo::BaseMaker::updateAllHeader |
( |
const std::string & | rstrTargetHeaderPath | ) |
const |
If available, the individual header files will be adjusted in the transferred directory.
Passes updateHeader (...) to updateAllX (...).
- Parameters
-
[in] | rstrTargetHeaderPath | The path in which the header files are to be adjusted, e.g. "C:/Path/include/". |
- Returns
- A return value < 0 indicates an error.
◆ updateAllSource()
int glo::BaseMaker::updateAllSource |
( |
const std::string & | rstrTargetSourcePath | ) |
const |
If available, the individual source files will be adjusted in the transferred directory.
Passes updateSource (...) to updateAllX (...).
- Parameters
-
[in] | rstrTargetSourcePath | The path in which the source files are to be adjusted, e.g. "C:/Path/source/". |
- Returns
- A return value < 0 indicates an error.
◆ updateAllX()
int glo::BaseMaker::updateAllX |
( |
UPDATE_FUNCPTR | pMemberFunction, |
|
|
const std::string & | rstrTargetPath ) const |
|
protected |
◆ updateHeader()
int glo::BaseMaker::updateHeader |
( |
const std::string & | rstrTargetHeaderPath, |
|
|
const ClassInfo & | rClassInfo ) const |
A header file of a class information in the passed directory will be adapted, if available. The file and class name and the individual attribute and method names are determined from the class information.
- Parameters
-
[in] | rstrTargetHeaderPath | The path in which the header file is to be adjusted, e.g. "C:/Path/include/". |
[in] | rClassInfo | The class information with the necessary information. |
- Returns
- A return value < 0 indicates an error.
◆ updateSource()
int glo::BaseMaker::updateSource |
( |
const std::string & | rstrTargetSourcePath, |
|
|
const ClassInfo & | rClassInfo ) const |
A source file of a class information in the passed directory will be adapted, if available. The file and class name and the individual attribute and method names are determined from the class information.
- Parameters
-
[in] | rstrTargetSourcePath | The path in which the source file is to be adjusted, e.g. "C:/Path/source/". |
[in] | rClassInfo | The class information with the necessary information. |
- Returns
- A return value < 0 indicates an error.
◆ writeTable()
int glo::BaseMaker::writeTable |
( |
const std::string & | rstrTargetTablePath, |
|
|
const ClassInfo & | rClassInfo, |
|
|
bool | bCreateNew ) const |
A table file of a class information is created in the transferred directory.
- Parameters
-
[in] | rstrTargetTablePath | The path in which the table is to be created, e.g. "C:/Path/Data/". |
[in] | rClassInfo | The class information with the table name. |
[in] | bCreateNew | If true, an existing file is overwritten, otherwise not. |
- Returns
- A return value < 0 indicates an error.
◆ m_spSchemaInterface
To be able to generate data tables, C++ header and source files, the schema must be accessible.
◆ m_strBeforeKeywordPersistent
std::string glo::BaseMaker::m_strBeforeKeywordPersistent |
|
private |
The GlobalObjects keyword "persistent" can be preceded by a string in the line above in the generated header.
◆ m_strBeforeKeywordTransient
std::string glo::BaseMaker::m_strBeforeKeywordTransient |
|
private |
The GlobalObjects keyword "transient" can be preceded by a string in the line above in the generated header.
◆ m_strBehindKeywordPersistent
std::string glo::BaseMaker::m_strBehindKeywordPersistent |
|
private |
The GlobalObjects keyword "persistent" can be appended to a string in the line below in the generated header.
◆ m_strBehindKeywordTransient
std::string glo::BaseMaker::m_strBehindKeywordTransient |
|
private |
The GlobalObjects keyword "transient" can be appended to a string in the line below in the generated header.
◆ m_strCommentBlockStartExt
std::string glo::BaseMaker::m_strCommentBlockStartExt |
|
private |
A comment block is introduced with a slash and Multiplication sign and ended with an Multiplication sign and slash.
A string stored here is added to the introductory comment characters.
◆ m_strDokuAttributLine
std::string glo::BaseMaker::m_strDokuAttributLine |
|
private |
A separator line of '-' as a comment for the attributes (optics).
◆ m_strDokuCrossLine
std::string glo::BaseMaker::m_strDokuCrossLine |
|
private |
A separator line of '+' as comment for the header and source files (optics).
◆ m_strDokuLine
std::string glo::BaseMaker::m_strDokuLine |
|
private |
A separator line of '-' as comment for the header and source files (optics).
◆ m_strDokuStarLine
std::string glo::BaseMaker::m_strDokuStarLine |
|
private |
A separator line of '*' as comment for the header and source files (optics).
◆ m_strOutputLine
std::string glo::BaseMaker::m_strOutputLine |
|
private |
A separator line of '-' for information output.
The documentation for this class was generated from the following file: