![]() |
|
PhoenixGenerator
2.0.4
Set of tools to generate code
|
#include "openFileStream.h"#include "header_generator.h"#include "cmakelist_generator.h"#include "wrapper_generator_module.h"#include "wrapper_generator_struct.h"
Include dependency graph for wrapper_generator_struct.cpp:Go to the source code of this file.
Functions | |
| bool | project_wrapper_classTest (const PWrapperTraitBackendManager &manager, const PPath &testDirectory, const PString &moduleName, const PClassConfig &classConfig, const GeneratorMode &mode) |
| Generate the test for all class inside the module. | |
| void | project_wrapper_enumImplNewc (std::ofstream &fs, const PClassConfig &classConfig) |
| Implement new and dealloc. | |
| bool | project_wrapper_generator_setuppy (const PWrapperTraitBackendManager &manager, const ProjectParam &projectParam, const PPath &fileNameSetup, const PString &projectVersion) |
| Create the readme of the project directory. | |
| bool | wrapper_generator_class_cpp (const PWrapperTraitBackendManager &manager, const std::vector< PClassConfig > &vecClassConfig, const PPath &outputSourceDir, const PPath &baseFileName, const GeneratorMode &mode, const PVecPath &vecInclude) |
| Creates wrapper header and source files. | |
| bool | wrapper_generator_class_cpp_test (const PWrapperTraitBackendManager &manager, const PPath &testDirectory, const PString &moduleName, const std::vector< PClassConfig > &vecClassConfig, const GeneratorMode &mode) |
| Generate the test for all class inside the module. | |
| bool | wrapper_generator_class_full (const PWrapperTraitBackendManager &manager, const ProjectParam &projectParam) |
| Generate the full sources and related unit tests from configuration. | |
| void | wrapper_generator_class_header (const PWrapperTraitBackendManager &manager, std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) |
| Create the wrapper declaration of the given class. | |
| bool | wrapper_generator_class_headerFile (const PWrapperTraitBackendManager &manager, const PPath &headerFile, const PVecClassConfig &vecClassConfig, const GeneratorMode &mode, const PVecPath &vecInclude) |
| Create the wrapper declaration of the given class. | |
| void | wrapper_generator_class_implDealloc (std::ofstream &fs, const PClassConfig &classConfig) |
| Implement new and dealloc. | |
| void | wrapper_generator_class_implNewc (std::ofstream &fs, const PClassConfig &classConfig) |
| Implement new and dealloc. | |
| void | wrapper_generator_class_source (const PWrapperTraitBackendManager &manager, std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) |
| Create the wrapper implementation of the given class. | |
| bool | wrapper_generator_class_sourceFile (const PWrapperTraitBackendManager &manager, const PPath &sourceFile, const PPath &headerFile, const std::vector< PClassConfig > &vecClassConfig, const GeneratorMode &mode) |
| Create the wrapper implementation of the given file. | |
| void | wrapper_generator_enum_header (const PWrapperTraitBackendManager &manager, std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) |
| Create the wrapper declaration of the given class. | |
| void | wrapper_generator_enum_source (const PWrapperTraitBackendManager &manager, std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) |
| Create the wrapper implementation of the given class. | |
| bool project_wrapper_classTest | ( | const PWrapperTraitBackendManager & | manager, |
| const PPath & | testDirectory, | ||
| const PString & | moduleName, | ||
| const PClassConfig & | classConfig, | ||
| const GeneratorMode & | mode ) |
Generate the test for all class inside the module.
| manager | : PTraitBackendManager which handles all trait backend |
| testDirectory | : directory whre to write tests |
| moduleName | : name of the python module |
| classConfig | : class confoguration |
| mapClass | : map of all classes/types defined for this configuration |
| mode | : enabled modes of the generator |
Definition at line 451 of file wrapper_generator_struct.cpp.
References getCMakeListsHeader(), PClassConfig::getIsEnum(), PClassConfig::getName(), and PWrapperTraitBackendManager::testFunction().
Referenced by wrapper_generator_class_cpp_test().
Here is the call graph for this function:
Here is the caller graph for this function:| void project_wrapper_enumImplNewc | ( | std::ofstream & | fs, |
| const PClassConfig & | classConfig ) |
Implement new and dealloc.
| [out] | fs | : output file stream to be used |
| classConfig | : class configuration | |
| moduleName | : name of the module where the class should be defined |
Definition at line 72 of file wrapper_generator_struct.cpp.
References PClassConfig::getListAttribute(), and PClassConfig::getName().
Referenced by wrapper_generator_enum_source().
Here is the call graph for this function:
Here is the caller graph for this function:| bool project_wrapper_generator_setuppy | ( | const PWrapperTraitBackendManager & | manager, |
| const ProjectParam & | projectParam, | ||
| const PPath & | fileNameSetup, | ||
| const PString & | projectVersion ) |
Create the readme of the project directory.
| manager | : manager to generated wrapper soruces |
| projectParam | : parameters of the project |
| fileNameSetup | : name of the file to be created |
| projectVersion | : version of the project |
Definition at line 365 of file wrapper_generator_struct.cpp.
References getCMakeListsHeader(), PDataConfig::getFileName(), ProjectParam::mode, GeneratorMode::moduleName, ProjectParam::name, PWrapperTraitBackendManager::setupAddDependency(), and ProjectParam::vecDataConfig.
Referenced by wrapper_generator_class_full().
Here is the call graph for this function:
Here is the caller graph for this function:| bool wrapper_generator_class_cpp | ( | const PWrapperTraitBackendManager & | manager, |
| const std::vector< PClassConfig > & | vecClassConfig, | ||
| const PPath & | outputSourceDir, | ||
| const PPath & | baseFileName, | ||
| const GeneratorMode & | mode, | ||
| const PVecPath & | vecInclude ) |
Creates wrapper header and source files.
| manager | : PTraitBackendManager which handles all trait backend |
| vecClassConfig | : vector of class config we want to save |
| baseFileName | : base file name for header or source file |
| outputSourceDir | : output directory where to save sources |
| mode | : all modes of the generator (data/check/type/config stream) |
Definition at line 348 of file wrapper_generator_struct.cpp.
References GeneratorMode::moduleName, wrapper_generator_class_headerFile(), and wrapper_generator_class_sourceFile().
Referenced by wrapper_generator_class_full().
Here is the call graph for this function:
Here is the caller graph for this function:| bool wrapper_generator_class_cpp_test | ( | const PWrapperTraitBackendManager & | manager, |
| const PPath & | testDirectory, | ||
| const PString & | moduleName, | ||
| const std::vector< PClassConfig > & | vecClassConfig, | ||
| const GeneratorMode & | mode ) |
Generate the test for all class inside the module.
| manager | : PTraitBackendManager which handles all trait backend |
| testDirectory | : directory whre to write tests |
| moduleName | : name of the python module |
| vecClassConfig | : vector of class confoguration |
| mode | : enabled modes of the generator |
Definition at line 507 of file wrapper_generator_struct.cpp.
References GeneratorMode::mapClass, and project_wrapper_classTest().
Referenced by wrapper_generator_class_full().
Here is the call graph for this function:
Here is the caller graph for this function:| bool wrapper_generator_class_full | ( | const PWrapperTraitBackendManager & | manager, |
| const ProjectParam & | projectParam ) |
Generate the full sources and related unit tests from configuration.
| manager | : PTraitBackendManager which handles all trait backend |
| projectParam | : description of classes and how and where to generate sources and test |
Definition at line 525 of file wrapper_generator_struct.cpp.
References PDataConfig::getFileName(), PDataConfig::getVecClassConfig(), PDataConfig::getVecInclude(), ProjectParam::mode, GeneratorMode::moduleName, ProjectParam::name, ProjectParam::outputProjectDir, ProjectParam::outputSourceDir, ProjectParam::outputTestDir, project_wrapper_generator_setuppy(), project_wrapper_moduleGeneratorMain(), ProjectParam::vecDataConfig, ProjectParam::version, wrapper_generator_class_cpp(), and wrapper_generator_class_cpp_test().
Referenced by simple_project_generate_source().
Here is the call graph for this function:
Here is the caller graph for this function:| void wrapper_generator_class_header | ( | const PWrapperTraitBackendManager & | manager, |
| std::ofstream & | fs, | ||
| const PClassConfig & | classConfig, | ||
| const GeneratorMode & | mode ) |
Create the wrapper declaration of the given class.
| manager | : PTraitBackendManager which handles all trait backend | |
| [out] | fs | : file to be completed |
| classConfig | : configuration of the class to be used | |
| mode | : mode of the generator |
Definition at line 37 of file wrapper_generator_struct.cpp.
References PWrapperTraitBackendManager::classMethodDeclaration(), PClassConfig::getClassDocumentation(), PClassConfig::getListAttribute(), project_wrapper_attributeDef(), and wrapper_getClassName().
Referenced by wrapper_generator_class_headerFile().
Here is the call graph for this function:
Here is the caller graph for this function:| bool wrapper_generator_class_headerFile | ( | const PWrapperTraitBackendManager & | manager, |
| const PPath & | headerFile, | ||
| const PVecClassConfig & | vecClassConfig, | ||
| const GeneratorMode & | mode, | ||
| const PVecPath & | vecInclude ) |
Create the wrapper declaration of the given class.
| manager | : PWrapperTraitBackendManager which handles all trait backend |
| headerFile | : file to be saved |
| vecClassConfig | : configuration of the class to be used |
| mode | : mode of the generator |
| vecInclude | : vector of include files to be added into the header |
Definition at line 282 of file wrapper_generator_struct.cpp.
References PWrapperTraitBackendManager::headerExtraInclude(), licenceSave(), makeMultiIncludeDefineMacro(), wrapper_generator_class_header(), and wrapper_generator_enum_header().
Referenced by wrapper_generator_class_cpp().
Here is the call graph for this function:
Here is the caller graph for this function:| void wrapper_generator_class_implDealloc | ( | std::ofstream & | fs, |
| const PClassConfig & | classConfig ) |
Implement new and dealloc.
| [out] | fs | : file to be completed |
| classConfig | : class configuration |
Definition at line 216 of file wrapper_generator_struct.cpp.
References getIsSimpleType(), PClassConfig::getListAttribute(), and PClassConfig::getName().
Referenced by wrapper_generator_class_source().
Here is the call graph for this function:
Here is the caller graph for this function:| void wrapper_generator_class_implNewc | ( | std::ofstream & | fs, |
| const PClassConfig & | classConfig ) |
Implement new and dealloc.
| [out] | fs | : file to be completed |
| classConfig | : class configuration |
Definition at line 173 of file wrapper_generator_struct.cpp.
References generator_typeIsList(), getIsSimpleType(), PClassConfig::getListAttribute(), and PClassConfig::getName().
Referenced by wrapper_generator_class_source().
Here is the call graph for this function:
Here is the caller graph for this function:| void wrapper_generator_class_source | ( | const PWrapperTraitBackendManager & | manager, |
| std::ofstream & | fs, | ||
| const PClassConfig & | classConfig, | ||
| const GeneratorMode & | mode ) |
Create the wrapper implementation of the given class.
| manager | : PTraitBackendManager which handles all trait backend | |
| [out] | fs | : file to be completed |
| classConfig | : configuration of the class to be used | |
| mode | : mode of the generator |
Definition at line 242 of file wrapper_generator_struct.cpp.
References PWrapperTraitBackendManager::classMethodImplementation(), GeneratorMode::moduleName, project_wrapper_classImplPythonType(), PWrapperTraitBackendManager::registerClassGetterSetter(), PWrapperTraitBackendManager::registerClassMember(), PWrapperTraitBackendManager::registerClassMethod(), wrapper_generator_class_implDealloc(), wrapper_generator_class_implNewc(), and wrapper_getClassName().
Referenced by wrapper_generator_class_sourceFile().
Here is the call graph for this function:
Here is the caller graph for this function:| bool wrapper_generator_class_sourceFile | ( | const PWrapperTraitBackendManager & | manager, |
| const PPath & | sourceFile, | ||
| const PPath & | headerFile, | ||
| const std::vector< PClassConfig > & | vecClassConfig, | ||
| const GeneratorMode & | mode ) |
Create the wrapper implementation of the given file.
| manager | : PWrapperTraitBackendManager which handles all trait backend |
| sourceFile | : source file to be saved |
| headerFile | : header to be used with this source file |
| vecClassConfig | : vector of configuration of the classes to be used |
| mode | : mode of the generator |
Definition at line 323 of file wrapper_generator_struct.cpp.
References licenceSave(), wrapper_generator_class_source(), and wrapper_generator_enum_source().
Referenced by wrapper_generator_class_cpp().
Here is the call graph for this function:
Here is the caller graph for this function:| void wrapper_generator_enum_header | ( | const PWrapperTraitBackendManager & | manager, |
| std::ofstream & | fs, | ||
| const PClassConfig & | classConfig, | ||
| const GeneratorMode & | mode ) |
Create the wrapper declaration of the given class.
| manager | : PTraitBackendManager which handles all trait backend | |
| [out] | fs | : file to be completed |
| classConfig | : configuration of the class to be used | |
| mode | : mode of the generator |
Definition at line 20 of file wrapper_generator_struct.cpp.
References wrapper_getClassName().
Referenced by wrapper_generator_class_headerFile().
Here is the call graph for this function:
Here is the caller graph for this function:| void wrapper_generator_enum_source | ( | const PWrapperTraitBackendManager & | manager, |
| std::ofstream & | fs, | ||
| const PClassConfig & | classConfig, | ||
| const GeneratorMode & | mode ) |
Create the wrapper implementation of the given class.
| manager | : PTraitBackendManager which handles all trait backend | |
| [out] | fs | : file to be completed |
| classConfig | : configuration of the class to be used | |
| mode | : mode of the generator |
Definition at line 161 of file wrapper_generator_struct.cpp.
References project_wrapper_enumImplNewc().
Referenced by wrapper_generator_class_sourceFile().
Here is the call graph for this function:
Here is the caller graph for this function: