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

Go to the source code of this file.

Typedefs

typedef std::vector< PArchLibPVecArchLib
 
typedef std::vector< PArgumentPVecArgument
 
typedef std::vector< PFunctionPVecFunction
 
typedef std::vector< size_t > PVecSizet
 
typedef std::vector< PSourcePVecSource
 
typedef PVecString PVecStr
 

Functions

void addArch (PVecArchLib &vecArch, const PString &arch, const PString &libName)
 Add a PArchLib in the vector of Architecture if the libName is not empty.
 
PArchLib createArchLib (const PString &arch, const PString &libName)
 Set a PArchLib.
 
PPath getLibraryFile (const PVecArchLib &vecArch)
 Get the first non empty library file name.
 
bool repr_isFunction (const PFunction &fct)
 Say if the current function is a function prototype.
 

Typedef Documentation

◆ PVecArchLib

typedef std::vector<PArchLib> PVecArchLib

Definition at line 17 of file representation.h.

◆ PVecArgument

typedef std::vector<PArgument> PVecArgument

Definition at line 14 of file representation.h.

◆ PVecFunction

typedef std::vector<PFunction> PVecFunction

Definition at line 15 of file representation.h.

◆ PVecSizet

typedef std::vector<size_t> PVecSizet

Definition at line 13 of file representation.h.

◆ PVecSource

typedef std::vector<PSource> PVecSource

Definition at line 16 of file representation.h.

◆ PVecStr

typedef PVecString PVecStr

Definition at line 12 of file representation.h.

Function Documentation

◆ addArch()

void addArch ( PVecArchLib & vecArch,
const PString & arch,
const PString & libName )

Add a PArchLib in the vector of Architecture if the libName is not empty.

Parameters
[out]vecArch: vector of architecture to be updated
arch: name of the architecture
libName: name of the library

Definition at line 34 of file representation.cpp.

34 {
35 if(libName != ""){
36 vecArch.push_back(createArchLib(arch, libName));
37 }
38}
PArchLib createArchLib(const PString &arch, const PString &libName)
Set a PArchLib.

References createArchLib().

Referenced by parseVecArchLib().

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

◆ createArchLib()

PArchLib createArchLib ( const PString & arch,
const PString & libName )

Set a PArchLib.

Parameters
arch: name of the architecture
libName: name of the library for the corresponding architecture
Returns
corresponding PArchLib

Definition at line 22 of file representation.cpp.

22 {
23 PArchLib archLib;
24 archLib.setArchitecture(arch);
25 archLib.setName(libName);
26 return archLib;
27}
Library to be related to an architecture.
Definition PRepr.h:110
void setArchitecture(const PString &architecture)
Sets the architecture of the PArchLib.
Definition PRepr.cpp:406
void setName(const PPath &name)
Sets the name of the PArchLib.
Definition PRepr.cpp:399

References PArchLib::setArchitecture(), and PArchLib::setName().

Referenced by addArch().

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

◆ getLibraryFile()

PPath getLibraryFile ( const PVecArchLib & vecArch)

Get the first non empty library file name.

Parameters
vecArch: vector of architecture
Returns
library file name or empty string if none is found

Definition at line 44 of file representation.cpp.

44 {
45 PPath libName("");
46 PVecArchLib::const_iterator it(vecArch.begin());
47 while(it != vecArch.end() && libName == ""){
48 libName = it->getName();
49 ++it;
50 }
51 return libName;
52}

Referenced by cpp_backendProxyLoaderSource(), and createSourceFromConfig().

+ Here is the caller graph for this function:

◆ repr_isFunction()

bool repr_isFunction ( const PFunction & fct)

Say if the current function is a function prototype.

Parameters
fct: PFunction
Returns
true if the function is a function prototype, false otherwise

Definition at line 13 of file representation.cpp.

13 {
14 return fct.getOtherCode() == "";
15}
const PString & getOtherCode() const
Gets the otherCode of the PFunction.
Definition PRepr.cpp:271

References PFunction::getOtherCode().

Referenced by cpp_backendHeader(), cpp_backendSource(), and cpp_backendTableHeaderHandleType().

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