Added a config file and implemented code for it

This commit is contained in:
tleety
2015-10-15 12:15:53 +02:00
parent 5da96f40f3
commit 52fe2e697e
5 changed files with 55 additions and 2 deletions
+35
View File
@@ -0,0 +1,35 @@
#ifndef ConfigFile_h__
#define ConfigFile_h__
#include <string>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ini_parser.hpp>
#include "ResourceManager.h"
namespace dd
{
class ConfigFile : public Resource
{
friend class ResourceManager;
private:
ConfigFile(std::string path);
public:
template <typename T>
T GetValue(std::string key)
{
std::cout << m_ptree.get<T>(key) << std::endl;
return m_ptree.get<T>(key);
}
private:
boost::property_tree::ptree m_ptree;
};
};
#endif // ConfigFile_h__