PhoenixInkscape  2.0.0
Generate multiple png files with svg inkscape files
main.cpp
Go to the documentation of this file.
1 
2 /***************************************
3  Auteur : Pierre Aubert
4  Mail : pierre.aubert@lapp.in2p3.fr
5  Licence : CeCILL-C
6 ****************************************/
7 
8 #include "phoenix_assert.h"
9 #include "phoenix_check.h"
10 #include "dico_replace_var.h"
11 
14  PMapKnownVar mapKeyVariable;
15  mapKeyVariable["${varA}"] = "someStr";
16  mapKeyVariable["${varB}"] = "otherStr";
17 
18  phoenix_assert(phoenix_check("base empty var begin end", dico_replace_var_str("input", mapKeyVariable, "", ""), "input"));
19  phoenix_assert(phoenix_check("base empty var begin", dico_replace_var_str("input", mapKeyVariable, "", "}"), "input"));
20  phoenix_assert(phoenix_check("base empty var end", dico_replace_var_str("input", mapKeyVariable, "${", ""), "input"));
21  phoenix_assert(phoenix_check("base empty no replace", dico_replace_var_str("input", mapKeyVariable, "${", "}"), "input"));
22  phoenix_assert(phoenix_check("base empty replace A", dico_replace_var_str("input ${varA}", mapKeyVariable, "${", "}"), "input someStr"));
23  phoenix_assert(phoenix_check("base empty replace A B", dico_replace_var_str("input ${varA}${varB}", mapKeyVariable, "${", "}"), "input someStrotherStr"));
24  phoenix_assert(phoenix_check("base empty replace unexisting C", dico_replace_var_str("input ${varC}", mapKeyVariable, "${", "}"), "input ${varC}"));
25 }
26 
27 
28 int main(int argc, char** argv){
30  return 0;
31 }
32 
33 
PString dico_replace_var_str(const PString &baseStr, const PMapKnownVar &mapKeyVariable, const PString &varBegin, const PString &varEnd)
Update the suffix of the file.
std::map< PString, PString > PMapKnownVar
Map of known variables.
#define phoenix_assert(isOk)
bool phoenix_check(const std::string &testName, const std::string &val, const std::string &reference)
Check two string.
int main(int argc, char **argv)
Definition: main.cpp:290
void checkVarReplaceStr()
Check the replace of var in str.
Definition: main.cpp:13