PhoenixGenerator  2.0.0
Set of tools to generate code
wrapper_module_generator.h File Reference
+ Include dependency graph for wrapper_module_generator.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool project_wrapper_moduleGenerator (const PPath &modulePath, const ProjectConfig &projectConfig, const PString &baseImplInclude, const std::vector< PClassConfig > &vecClassConfig, const PVecPath &vecInclude)
 Create the wrapper module. More...
 

Function Documentation

◆ project_wrapper_moduleGenerator()

bool project_wrapper_moduleGenerator ( const PPath modulePath,
const ProjectConfig projectConfig,
const PString baseImplInclude,
const std::vector< PClassConfig > &  vecClassConfig,
const PVecPath vecInclude 
)

Create the wrapper module.

Parameters
modulePath: path of the module
projectConfig: config of the project
baseImplInclude: basic include of the module implementation
vecClassConfig: vector of class configuration
vecInclude: vector of includes
Returns
true on success, false otherwise

Definition at line 1296 of file wrapper_module_generator.cpp.

1296  {
1297  PPath mainModuleFile(modulePath / PPath(projectConfig.name.toLower() + "_module.cpp"));
1298  if(!project_wrapper_moduleGeneratorMain(mainModuleFile, projectConfig, baseImplInclude, vecClassConfig, vecInclude)){return false;}
1299  //TODO : Need to save the class definition, with struct, type, getter, setter, method to get the name of the type in TypeStream, magic with DataStream to avoid data copy
1300 
1301  PPath wrapperHeader(modulePath / PPath(baseImplInclude + "_wrapper.h"));
1302  if(!project_wrapper_moduleGeneratorWrapperHeader(wrapperHeader, projectConfig, baseImplInclude, vecClassConfig, vecInclude)){return false;}
1303 
1304  PPath wrapperSource(modulePath / PPath(baseImplInclude + "_wrapper.cpp"));
1305  if(!project_wrapper_moduleGeneratorWrapperImpl(wrapperSource, projectConfig, baseImplInclude, vecClassConfig, vecInclude)){return false;}
1306 
1307  return true;
1308 }
Path of a directory or a file.
Definition: PPath.h:17
PString toLower() const
Convert PString in lower case.
Definition: PString.cpp:598
PString name
Name of the project.
bool project_wrapper_moduleGeneratorWrapperImpl(const PPath &wrapperSource, const ProjectConfig &projectConfig, const PString &baseImplInclude, const std::vector< PClassConfig > &vecClassConfig, const PVecPath &vecInclude)
Create the wrapper module source.
bool project_wrapper_moduleGeneratorWrapperHeader(const PPath &wrapperHeader, const ProjectConfig &projectConfig, const PString &baseImplInclude, const std::vector< PClassConfig > &vecClassConfig, const PVecPath &vecInclude)
Create the wrapper module header.
bool project_wrapper_moduleGeneratorMain(const PPath &fileName, const ProjectConfig &projectConfig, const PString &baseImplInclude, const std::vector< PClassConfig > &vecClassConfig, const PVecPath &vecInclude)
Create the main wrapper module.

References ProjectConfig::name, project_wrapper_moduleGeneratorMain(), project_wrapper_moduleGeneratorWrapperHeader(), project_wrapper_moduleGeneratorWrapperImpl(), and PString::toLower().

Referenced by project_wrapper_generator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: