PhoenixFileParser  1.0.0
Set of tools to ease file parsing
Loading...
Searching...
No Matches
phoenix_get_string.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 __PHOENIX_GET_STRING_H__
8#define __PHOENIX_GET_STRING_H__
9
10#include "DicoValue.h"
11
12bool phoenix_convertBoolType(const PString & strConfig);
13
14template<typename T>
15T phoenix_load_value_from_config(const DicoValue & dico, const PString & varName, T defaultValue);
16
17template<typename T>
18bool phoenix_load_value_from_dico(T & value, const DicoValue & dico, const PString & varName);
19
20template<>
21bool phoenix_load_value_from_dico<bool>(bool & value, const DicoValue & dico, const PString & varName);
22
23template<typename T>
24bool phoenix_save_value_to_dico(DicoValue & dico, const T & value, const PString & varName);
25template<>
26bool phoenix_save_value_to_dico<bool>(DicoValue & dico, const bool & value, const PString & varName);
27
28template<typename T>
29void phoenix_load_vecValue_from_config(std::vector<T> & vecValue, const DicoValue & dico, const PString & varName);
30template<typename T>
31std::vector<T> phoenix_load_vecValue_from_config(const DicoValue & dico, const PString & varName);
32
33template<>
34bool phoenix_load_value_from_config<bool>(const DicoValue & dico, const PString & varName, bool defaultValue);
35
36void phoenix_get_vecstring(PVecString & vecValue, const DicoValue & dico, const PString & varName);
37PVecString phoenix_get_vecstring(const DicoValue & dico, const PString & varName);
38
39PString phoenix_get_string(const DicoValue & dico, const PString & varName, const PString & defaultValue);
40PString phoenix_get_string(const DicoValue & dico, const PString & varName, const PString & defaultValue, const PString & defaultValue2);
41
42PString phoenix_get_nested_string(const DicoValue & dico, const PVecString & vecVarAddress);
43
45
46#endif
47
Dictionnary of values.
Definition DicoValue.h:17
bool phoenix_load_value_from_dico(T &value, const DicoValue &dico, const PString &varName)
Get the value from a dictionnary.
PString phoenix_get_string(const DicoValue &dico, const PString &varName, const PString &defaultValue)
Get the string from a dictionnary.
T phoenix_load_value_from_config(const DicoValue &dico, const PString &varName, T defaultValue)
Get the value from a dictionnary.
bool phoenix_load_value_from_dico< bool >(bool &value, const DicoValue &dico, const PString &varName)
Get bool value from a dictionnary (specialization for bool)
bool phoenix_convertBoolType(const PString &strConfig)
Convert the configuration of the cleaning type into a bool.
bool phoenix_save_value_to_dico< bool >(DicoValue &dico, const bool &value, const PString &varName)
Save the value to a dictionnary (specialization for bool)
bool phoenix_load_value_from_config< bool >(const DicoValue &dico, const PString &varName, bool defaultValue)
Get bool value from a dictionnary (specialization for bool)
void phoenix_get_vecstring(PVecString &vecValue, const DicoValue &dico, const PString &varName)
Load a vector of string from a dictionnary.
void phoenix_load_vecValue_from_config(std::vector< T > &vecValue, const DicoValue &dico, const PString &varName)
Load a vector of value from a dictionnary.
bool phoenix_save_value_to_dico(DicoValue &dico, const T &value, const PString &varName)
Save the value to a dictionnary.
PString phoenix_get_nested_string(const DicoValue &dico, const PVecString &vecVarAddress)
Get a nested value in the DicoValue.