![]() |
PhoenixGenerator
2.0.0
Set of tools to generate code
|
#include "header_generator.h"
#include "cmakelist_generator.h"
#include "saveClassConfig.h"
#include "saveClassConfigTest.h"
Go to the source code of this file.
Functions | |
PString | createCheckClassEquality (const PClassConfig &classConfig, bool isConst) |
Create the class check. More... | |
PString | createTestClassCopy (const PClassConfig &classConfig, bool enableTypeStream) |
Create the class check. More... | |
PString | getTestDefaultValueTypeInCpp (const PString &type) |
Get the default value of a type in C++. More... | |
bool | saveClassTest (const PPath &outputTestDir, const PString &libName, const PClassConfig &classConfig, const PPath &baseFileName, bool enableDataStream, bool enableTypeStream) |
Save the unit test of the generated PClassConfig. More... | |
bool | saveClassTest (const PPath &outputTestDir, const PString &libName, const std::vector< PClassConfig > &classConfig, const PPath &baseFileName, bool enableDataStream, bool enableTypeStream) |
Save the unit test of the generated PClassConfig. More... | |
bool | saveClassTestCMakeLists (const PPath &outputCurrentTestDir, const PString &libName, const PClassConfig &classConfig, bool enableDataStream, bool enableTypeStream) |
Save the CMakeLists to be used to compile the unit test. More... | |
bool | saveClassTestMain (const PPath &outputCurrentTestDir, const PClassConfig &classConfig, const PPath &baseFileName, bool enableDataStream, bool enableTypeStream) |
Save the CMakeLists to be used to compile the unit test. More... | |
PString createCheckClassEquality | ( | const PClassConfig & | classConfig, |
bool | isConst | ||
) |
Create the class check.
classConfig | : class configuration to be used |
isConst | : true if the generated check has to use const classes |
Definition at line 43 of file saveClassConfigTest.cpp.
References getIsSimpleType(), PClassConfig::getListAttribute(), and PClassConfig::getName().
Referenced by saveClassTestMain().
PString createTestClassCopy | ( | const PClassConfig & | classConfig, |
bool | enableTypeStream | ||
) |
Create the class check.
classConfig | : class configuration to be used |
enableTypeStream | : true to test phoenix_getTypeName function |
Definition at line 80 of file saveClassConfigTest.cpp.
References PClassConfig::getListAttribute(), PClassConfig::getName(), and getTestDefaultValueTypeInCpp().
Referenced by saveClassTestMain().
Get the default value of a type in C++.
type | : type to be converted |
Definition at line 16 of file saveClassConfigTest.cpp.
Referenced by createTestClassCopy().
bool saveClassTest | ( | const PPath & | outputTestDir, |
const PString & | libName, | ||
const PClassConfig & | classConfig, | ||
const PPath & | baseFileName, | ||
bool | enableDataStream, | ||
bool | enableTypeStream | ||
) |
Save the unit test of the generated PClassConfig.
outputTestDir | : output directory where to put the genreated test (typically ../TESTS if the program is called from ./src) |
libName | : name of the generated library to link with |
classConfig | : class configuration to be used |
baseFileName | : base of output file name of the generated sources |
enableDataStream | : true to enable the data stream test |
enableTypeStream | : true to test phoenix_getTypeName function |
Definition at line 185 of file saveClassConfigTest.cpp.
References PPath::createDirectory(), PClassConfig::getName(), saveClassTestCMakeLists(), saveClassTestMain(), and PString::toUpper().
Referenced by saveClassTest(), and saveParserClassConfig().
bool saveClassTest | ( | const PPath & | outputTestDir, |
const PString & | libName, | ||
const std::vector< PClassConfig > & | classConfig, | ||
const PPath & | baseFileName, | ||
bool | enableDataStream, | ||
bool | enableTypeStream | ||
) |
Save the unit test of the generated PClassConfig.
outputTestDir | : output directory where to put the genreated test (typically ../TESTS if the program is called from ./src) |
libName | : name of the generated library to link with |
classConfig | : class configuration to be used |
baseFileName | : base of output file name of the generated sources |
enableDataStream | : true to enable the data stream test |
enableTypeStream | : true to test phoenix_getTypeName function |
Definition at line 207 of file saveClassConfigTest.cpp.
References saveClassTest().
bool saveClassTestCMakeLists | ( | const PPath & | outputCurrentTestDir, |
const PString & | libName, | ||
const PClassConfig & | classConfig, | ||
bool | enableDataStream, | ||
bool | enableTypeStream | ||
) |
Save the CMakeLists to be used to compile the unit test.
outputCurrentTestDir | : current test directoru in which to create the CMakeLists.txt |
libName | : name of the generated library to link with |
classConfig | : class configuration to be used |
enableDataStream | : true to enable the data stream test |
enableTypeStream | : true to test phoenix_getTypeName function |
Definition at line 152 of file saveClassConfigTest.cpp.
References PString::firstToUpper(), getCMakeListsHeader(), PClassConfig::getName(), PPath::saveFileContent(), and PString::toLowerUnderscore().
Referenced by saveClassTest().
bool saveClassTestMain | ( | const PPath & | outputCurrentTestDir, |
const PClassConfig & | classConfig, | ||
const PPath & | baseFileName, | ||
bool | enableDataStream, | ||
bool | enableTypeStream | ||
) |
Save the CMakeLists to be used to compile the unit test.
outputCurrentTestDir | : current test directoru in which to create the CMakeLists.txt |
classConfig | : class configuration to be used |
baseFileName | : base of output file name of the generated sources |
enableDataStream | : true to enable the data stream test |
enableTypeStream | : true to test phoenix_getTypeName function |
Definition at line 122 of file saveClassConfigTest.cpp.
References createCheckClassEquality(), createTestClassCopy(), PClassConfig::getName(), licenceSaveStr(), and PPath::saveFileContent().
Referenced by saveClassTest().