ImSQL
C++ 기반 SQL 자동화 및 라이선스 관리 엔진
Loading...
Searching...
No Matches
config_loader.hpp File Reference

설정 파일 로딩 유틸리티를 정의하는 파일입니다. More...

#include <string>
#include <utils/engine_config.hpp>
+ Include dependency graph for config_loader.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool utils::loadConfig (const std::string &filepath, EngineConfig &config)
 설정 파일을 로드하는 함수 (범용).
 
bool utils::loadEngineConfig (const std::string &filepath, utils::EngineConfig &config)
 엔진 설정 파일을 로드하는 함수.
 

Detailed Description

설정 파일 로딩 유틸리티를 정의하는 파일입니다.

Function Documentation

◆ loadConfig()

bool utils::loadConfig ( const std::string & filepath,
EngineConfig & config )

설정 파일을 로드하는 함수 (범용).

JSON 형식의 설정 파일을 파싱하여 EngineConfig 객체를 초기화합니다.

Parameters
filepath설정 파일 경로
config설정 정보를 저장할 EngineConfig 객체
Returns
성공 여부 (true: 성공, false: 실패)

◆ loadEngineConfig()

bool utils::loadEngineConfig ( const std::string & filepath,
utils::EngineConfig & config )

엔진 설정 파일을 로드하는 함수.

엔진 전용 설정 파일을 로드하는 함수.

JSON 형식의 설정 파일을 파싱하여 EngineConfig 구조체에 값을 채워넣습니다.

Parameters
filepath설정 파일 경로
config설정 정보를 저장할 EngineConfig 객체
Returns
성공 여부 (true: 성공적으로 로딩됨, false: 실패)
  • 설정 파일은 다음과 같은 구조를 기대합니다:
    {
    "common": {
    "api_port": 8080,
    "local_sql_port": 3306,
    "local_sql_url": "localhost",
    "db_dir": "/path/to/db",
    "debug": true,
    "license": "/path/to/license.json"
    }
    }

loadConfig와 유사하지만, 엔진 전용 처리 로직을 포함할 수 있습니다.

Parameters
filepath설정 파일 경로
config설정 정보를 저장할 EngineConfig 객체
Returns
성공 여부 (true: 성공, false: 실패)