![]() |
PhoenixInkscape
2.0.0
Generate multiple png files with svg inkscape files
|
Go to the source code of this file.
Typedefs | |
typedef std::map< PString, std::pair< PNestedCall, DicoValue * > > | MapVarWithNestedCall |
Map of the variables which uses nested call. More... | |
typedef std::vector< std::pair< PNestedCall, DicoValue * > > | PVecReplaceVar |
Map used to replace variable value in nested calls (VariableName, PNestedCall) More... | |
Functions | |
bool | createNestedCallFromStr (PNestedCall &call, const PString &value, const PString varName, const PString &varBegin, const PString &varEnd) |
Create the PNestedCall from the given value. More... | |
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. More... | |
void | dico_find_all_var (PMapKnownVar &mapReadyVar, PVecReplaceVar &mapNestedVar, MapVarWithNestedCall &mapVarWithNestedCall, DicoValue &dico, const PString &varIdentifier) |
Get the variable which contains only a value and those with nested calls. More... | |
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. More... | |
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. More... | |
PString | dico_replace_var_str (const PString &baseStr, const PMapKnownVar &mapKeyVariable, const PString &varBegin, const PString &varEnd) |
Update the suffix of the file. More... | |
void | dico_update_all_nestedCall (PMapKnownVar &mapReadyVar, PVecReplaceVar &mapNestedVar, MapVarWithNestedCall &mapVarWithNestedCall, PNestedCall &nestedCall, DicoValue *dico, const PString &varIdentifier) |
Update variables with nested calls. More... | |
void | dico_update_all_var (PMapKnownVar &mapReadyVar, PVecReplaceVar &mapNestedVar, MapVarWithNestedCall &mapVarWithNestedCall, const PString &varIdentifier) |
Update the variable which contains nested calls. More... | |
typedef std::map<PString, std::pair<PNestedCall, DicoValue*> > MapVarWithNestedCall |
Map of the variables which uses nested call.
Definition at line 13 of file dico_replace_var.cpp.
typedef std::vector<std::pair<PNestedCall, DicoValue*> > PVecReplaceVar |
Map used to replace variable value in nested calls (VariableName, PNestedCall)
Definition at line 11 of file dico_replace_var.cpp.
bool createNestedCallFromStr | ( | PNestedCall & | call, |
const PString & | value, | ||
const PString | varName, | ||
const PString & | varBegin, | ||
const PString & | varEnd | ||
) |
Create the PNestedCall from the given value.
[out] | call | : PNestedCall |
value | : value to be used | |
varName | : name of the variable to be defined | |
varBegin | : characters which announce the begining of a variable (example ${) | |
varEnd | : characters which announce the ending of a variable (example }) |
Definition at line 89 of file dico_replace_var.cpp.
References PFileParser::getUntilKeyWithoutPatern(), PNestedCall::getVecNestedStr(), PFileParser::isEndOfFile(), PFileParser::setFileContent(), PNestedStr::setIsVarCall(), PNestedCall::setName(), and PNestedStr::setValue().
Referenced by dico_find_all_var().
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().
void dico_find_all_var | ( | PMapKnownVar & | mapReadyVar, |
PVecReplaceVar & | mapNestedVar, | ||
MapVarWithNestedCall & | mapVarWithNestedCall, | ||
DicoValue & | dico, | ||
const PString & | varIdentifier | ||
) |
Get the variable which contains only a value and those with nested calls.
[out] | mapReadyVar | : map of variables with values only |
[out] | mapNestedVar | : map of variables with nested calls |
[out] | mapVarWithNestedCall | : map of the variables which use nested calls |
varIdentifier | : String used to detect the variable names (example: '$' for ${varName}, § for §{varName}) | |
dico | : DicoValue to be used |
Definition at line 121 of file dico_replace_var.cpp.
References createNestedCallFromStr(), DicoValue::getKey(), DicoValue::getMapChild(), DicoValue::getString(), DicoValue::getVecChild(), DicoValue::hasKey(), DicoValue::hasMap(), and DicoValue::hasVec().
Referenced by dico_replace_var().
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().
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().
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().
Referenced by checkVarReplaceStr().
void dico_update_all_nestedCall | ( | PMapKnownVar & | mapReadyVar, |
PVecReplaceVar & | mapNestedVar, | ||
MapVarWithNestedCall & | mapVarWithNestedCall, | ||
PNestedCall & | nestedCall, | ||
DicoValue * | dico, | ||
const PString & | varIdentifier | ||
) |
Update variables with nested calls.
[out] | mapReadyVar | : map of variables with values only |
[out] | mapNestedVar | : map of variables with nested calls |
nestedCall | : nested call which is the split value of the dico | |
mapVarWithNestedCall | : map of the variables which use nested calls | |
dico | : DicoValue to be used | |
varIdentifier | : String used to detect the variable names (example: '$' for ${varName}, § for §{varName}) |
Definition at line 156 of file dico_replace_var.cpp.
References PNestedCall::getName(), DicoValue::getValue(), PNestedCall::getVecNestedStr(), and DicoValue::setValue().
Referenced by dico_update_all_var().
void dico_update_all_var | ( | PMapKnownVar & | mapReadyVar, |
PVecReplaceVar & | mapNestedVar, | ||
MapVarWithNestedCall & | mapVarWithNestedCall, | ||
const PString & | varIdentifier | ||
) |
Update the variable which contains nested calls.
[out] | mapReadyVar | : map of variables with values only |
[out] | mapNestedVar | : map of variables with nested calls |
mapVarWithNestedCall | : map of variable with nested call | |
varIdentifier | : String used to detect the variable names (example: '$' for ${varName}, § for §{varName}) |
Definition at line 202 of file dico_replace_var.cpp.
References dico_update_all_nestedCall().
Referenced by dico_replace_var().