PhoenixPresentation  2.0.0
Set of cmake function to automate presentation generation
dico_replace_var.h
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 #ifndef __DICO_REPLACE_VAR_H__
8 #define __DICO_REPLACE_VAR_H__
9 
10 #include "PNestedCall.h"
11 #include "DicoValue.h"
12 
14 typedef std::map<PString, PString> PMapKnownVar;
15 
16 void dico_create_nested_call(PNestedCall & call, const PString & baseStr, const PString & varBegin, const PString & varEnd);
17 void dico_replace_nested_call(PString & out, const PNestedCall & call, const PMapKnownVar & mapKeyVariable, const PString & varBegin, const PString & varEnd);
18 
19 PString dico_replace_var_str(const PString & baseStr, const PMapKnownVar & mapKeyVariable, const PString & varBegin = "${", const PString & varEnd = "}");
20 void dico_replace_var(DicoValue & dico, const PString & varIdentifier="$");
21 
22 
23 #endif
Dictionnary of values.
Definition: DicoValue.h:17
Class used to parse nested call variables.
Definition: PNestedCall.h:36
Extends the std::string.
Definition: PString.h:16
void dico_replace_var(DicoValue &dico, const PString &varIdentifier="$")
Replace all the variables which are string in the given DicoValue, when ${variable} apprears in the v...
std::map< PString, PString > PMapKnownVar
Map of known variables.
void dico_replace_nested_call(PString &out, const PNestedCall &call, const PMapKnownVar &mapKeyVariable, const PString &varBegin, const PString &varEnd)
Replace the nested call by the variables in map.
PString dico_replace_var_str(const PString &baseStr, const PMapKnownVar &mapKeyVariable, const PString &varBegin="${", const PString &varEnd="}")
Update the suffix of the file.
void dico_create_nested_call(PNestedCall &call, const PString &baseStr, const PString &varBegin, const PString &varEnd)
Create the nested calls of the input base string.