PhoenixHPCProxy  0.8.0
Lightweight HPC proxy
Loading...
Searching...
No Matches
representation.cpp
Go to the documentation of this file.
1/***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5****************************************/
6
7#include "representation.h"
8
10
13bool repr_isFunction(const PFunction & fct){
14 return fct.getOtherCode() == "";
15}
16
18
22PArchLib createArchLib(const PString & arch, const PString & libName){
23 PArchLib archLib;
24 archLib.setArchitecture(arch);
25 archLib.setName(libName);
26 return archLib;
27}
28
30
34void addArch(PVecArchLib & vecArch, const PString & arch, const PString & libName){
35 if(libName != ""){
36 vecArch.push_back(createArchLib(arch, libName));
37 }
38}
39
41
44PPath getLibraryFile(const PVecArchLib & vecArch){
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}
53
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
Function prototype.
Definition PRepr.h:46
const PString & getOtherCode() const
Gets the otherCode of the PFunction.
Definition PRepr.cpp:271
PPath getLibraryFile(const PVecArchLib &vecArch)
Get the first non empty library file name.
void addArch(PVecArchLib &vecArch, const PString &arch, const PString &libName)
Add a PArchLib in the vector of Architecture if the libName is not empty.
bool repr_isFunction(const PFunction &fct)
Say if the current function is a function prototype.
PArchLib createArchLib(const PString &arch, const PString &libName)
Set a PArchLib.
std::vector< PArchLib > PVecArchLib