51#include <boost/filesystem.hpp>
52#include <boost/property_tree/ini_parser.hpp>
57 boost::property_tree::ptree m_data;
59 CIniFile(
const std::string & filename,
const std::string & filepath =
"/etc/" )
61 opt_path =
"/opt/panel/";
63 m_path.append(filename);
64 opt_path.append(filename);
65 if(!boost::filesystem::exists( opt_path)) {
66 std::cout <<
"DS HAL : Using " << m_path <<std::endl;
67 boost::property_tree::ini_parser::read_ini(m_path, m_data);
70 std::cout <<
"DS HAL : Using " << opt_path << std::endl;
71 boost::property_tree::ini_parser::read_ini(opt_path, m_data);
78 T
Get(
const std::string & key)
80 return m_data.get<T>(key);
83 void Set(
const std::string & key,
const T & value){
Definition als_bl_iniparser.h:54
T Get(const std::string &key)
Definition als_bl_iniparser.h:78
CIniFile(const std::string &filename, const std::string &filepath="/etc/")
Definition als_bl_iniparser.h:59
~CIniFile()
Definition als_bl_iniparser.h:74
void Set(const std::string &key, const T &value)
Definition als_bl_iniparser.h:83