2019-11-28 01:44:50 +08:00
|
|
|
|
#include"config.h"
|
2019-12-02 13:15:42 +08:00
|
|
|
|
#include<hgl/util/json/JsonTool.h>
|
2019-11-26 17:27:48 +08:00
|
|
|
|
#include<iostream>
|
|
|
|
|
#include<hgl/log/LogInfo.h>
|
|
|
|
|
#include<hgl/type/BaseString.h>
|
|
|
|
|
|
|
|
|
|
using namespace hgl;
|
|
|
|
|
|
|
|
|
|
namespace
|
|
|
|
|
{
|
|
|
|
|
static FormatConfig fc[FormatType::RANGE_SIZE];
|
|
|
|
|
}//namespace
|
|
|
|
|
|
|
|
|
|
bool LoadConfig(const OSString &filename)
|
|
|
|
|
{
|
|
|
|
|
Json::Value js;
|
2019-11-28 01:44:50 +08:00
|
|
|
|
|
2019-11-26 17:27:48 +08:00
|
|
|
|
if(!LoadJson(js,filename))
|
|
|
|
|
{
|
|
|
|
|
LOG_ERROR(OS_TEXT("load config file<")+filename+OS_TEXT("> failed."));
|
|
|
|
|
return(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|