PhoenixFileParser  1.0.0
Set of tools to ease file parsing
Loading...
Searching...
No Matches
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
14typedef std::map<PString, PString> PMapKnownVar;
15
16void dico_create_nested_call(PNestedCall & call, const PString & baseStr, const PString & varBegin, const PString & varEnd);
17void dico_replace_nested_call(PString & out, const PNestedCall & call, const PMapKnownVar & mapKeyVariable, const PString & varBegin, const PString & varEnd);
18
19PString dico_replace_var_str(const PString & baseStr, const PMapKnownVar & mapKeyVariable, const PString & varBegin = "${", const PString & varEnd = "}");
20void 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
void dico_replace_var(DicoValue &dico, const PString &varIdentifier="$")
Replace all the variables which are string in the given DicoValue, when ${variable}...
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.