PhoenixHPCProxy  0.8.0
Lightweight HPC proxy
Loading...
Searching...
No Matches
backend_proxy_loader.h File Reference
+ Include dependency graph for backend_proxy_loader.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool cpp_backend_proxy (const PVecSource &vecSource, const PString &libraryName, const PVecArchLib &vecArchLib, const PPath &libDir, const PPath &outputDir)
 Save ProxyLoader with the corresponding a vector of PSource in the output directory.
 

Function Documentation

◆ cpp_backend_proxy()

bool cpp_backend_proxy ( const PVecSource & vecSource,
const PString & libraryName,
const PVecArchLib & vecArchLib,
const PPath & libDir,
const PPath & outputDir )

Save ProxyLoader with the corresponding a vector of PSource in the output directory.

Parameters
vecSource: vector of source
libraryName: name of the library to be created
vecArchLib: vector of library to be loaded on the fly by respect to the host architecture
libDir: directory where the sub libraries are installed
outputDir: output directory where to save ProxyLoader
Returns
true on success, false otherwise

Definition at line 273 of file backend_proxy_loader.cpp.

273 {
274 PString className(PString(libraryName + "ProxyLoader").firstToUpper());
275 PString headerSrc(cpp_backendProxyLoaderHeader(libraryName, className));
276 PString sourceSrc(cpp_backendProxyLoaderSource(vecSource, vecArchLib, className, libDir));
277 PPath outputHeaderFile(outputDir + "/" + className + ".h");
278 PPath outputSourceFile(outputDir + "/" + className + ".cpp");
279 if(!outputHeaderFile.saveFileContent(headerSrc)){
280 std::cerr << "cpp_backend : cannot save header file '"<<outputHeaderFile<<"'" << std::endl;
281 return false;
282 }
283 if(!outputSourceFile.saveFileContent(sourceSrc)){
284 std::cerr << "cpp_backend : cannot save source file '"<<outputSourceFile<<"'" << std::endl;
285 return false;
286 }
287 return true;
288}
PString cpp_backendProxyLoaderSource(const PVecSource &vecSource, const PVecArchLib &vecArchLib, const PString &className, const PString &libDir)
Create the Source of the ProxyLoader class.
PString cpp_backendProxyLoaderHeader(const PString &libraryName, const PString &className)
Create the Header definition of the ProxyLoader class.

References cpp_backendProxyLoaderHeader(), and cpp_backendProxyLoaderSource().

Referenced by createSourceFromConfig().

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