![]() |
|
PhoenixFileParser
1.5.1
Set of tools to ease file parsing
|
Include dependency graph for dico_replace_var.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Typedefs | |
| typedef std::map< PString, PString > | PMapKnownVar |
| Map of known variables. | |
Functions | |
| 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. | |
| 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. | |
| 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 value. | |
| PString | dico_replace_var_str (const PString &baseStr, const PMapKnownVar &mapKeyVariable, const PString &varBegin="${", const PString &varEnd="}") |
| Update the suffix of the file. | |
| typedef std::map<PString, PString> PMapKnownVar |
Map of known variables.
Definition at line 14 of file dico_replace_var.h.
| 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.
| [out] | call | : PNestedCall to be created |
| baseStr | : basic suffix to be used | |
| varBegin | : characters which announce the begining of a variable (example ${) | |
| varEnd | : characters which announce the ending of a variable (example }) |
Definition at line 21 of file dico_replace_var.cpp.
References PFileParser::getUntilKeyWithoutPatern(), PNestedCall::getVecNestedStr(), PFileParser::isEndOfFile(), PFileParser::setFileContent(), PNestedStr::setIsVarCall(), and PNestedStr::setValue().
Referenced by dico_replace_var_str().
Here is the call graph for this function:
Here is the caller graph for this function:| 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.
| [out] | out | : output string with replaced variables |
| call | : nested call to create the output string | |
| mapKeyVariable | : map of all defined variabled to be used | |
| varBegin | : characters which announce the begining of a variable (example ${) (in case variable is not found) | |
| varEnd | : characters which announce the ending of a variable (example }) (in case variable is not found) |
Definition at line 49 of file dico_replace_var.cpp.
References PNestedCall::getVecNestedStr().
Referenced by dico_replace_var_str().
Here is the call graph for this function:
Here is the caller graph for this function:| 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 value.
| dico | : DicoValue to be updated |
| varIdentifier | : String used to detect the variable names (example: '$' for ${varName}, § for §{varName}) |
Definition at line 218 of file dico_replace_var.cpp.
References dico_find_all_var(), and dico_update_all_var().
Here is the call graph for this function:| PString dico_replace_var_str | ( | const PString & | baseStr, |
| const PMapKnownVar & | mapKeyVariable, | ||
| const PString & | varBegin, | ||
| const PString & | varEnd ) |
Update the suffix of the file.
| baseStr | : basic suffix to be used |
| mapKeyVariable | : map of all defined variabled to be used |
| varBegin | : characters which announce the begining of a variable (example ${) |
| varEnd | : characters which announce the ending of a variable (example }) |
Definition at line 72 of file dico_replace_var.cpp.
References dico_create_nested_call(), and dico_replace_nested_call().
Here is the call graph for this function: