ini逻辑 占位
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
#ifndef INI_H
|
||||
#define INI_H
|
||||
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <util.h>
|
||||
#include <filesystem>
|
||||
#include <ios>
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
namespace ini
|
||||
{
|
||||
|
||||
class IniHelper
|
||||
{
|
||||
private:
|
||||
std::fstream handle;
|
||||
|
||||
public:
|
||||
IniHelper()
|
||||
{
|
||||
auto path = (fs::current_path() / "ini.ini").string();
|
||||
std::cout << path <<std::endl;
|
||||
handle = std::fstream(path, std::ios::ate);
|
||||
}
|
||||
|
||||
IniHelper(const std::string& file_path)
|
||||
{
|
||||
handle = std::fstream(file_path);
|
||||
}
|
||||
|
||||
~IniHelper() noexcept = default;
|
||||
|
||||
template <typename T = std::string>
|
||||
inline T GetValue(const std::string §ion, const std::string &key, T &&default_value)
|
||||
{
|
||||
throw std::exception("Not Implemented");
|
||||
}
|
||||
|
||||
template <typename T = std::string>
|
||||
inline bool SaveValue(const std::string §ion, const std::string &key, T &&default_value)
|
||||
{
|
||||
throw std::exception("Not Implemented");
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // !INI_H
|
||||
Reference in New Issue
Block a user