DKUtil::Config
An all purpose configuration module for x64 native plugin projects, supports ini, json and toml file types out of box. No more handling these settings on our own, use simplied API from this library!
Workflow
The configuration module in DKUtil works as "proxy per file", each Proxy represents one specific configuration file and manages the subsequent Bind, Load, Write, and Generate calls to this file and its bound Data.
- Declare
Datawith key names. - Initialize a
Proxyfor a config file on system. - Binds the
DatatoProxywith default values. - Use
Proxyto load/regenerate/output the boundData. - Use updated
Datain code.
Usage
The entire module is behind the namespace DKUtil::Config or dku::Config. To use, include the header:
cpp
#include "DKUtil/Config.hpp"Config Lookup Path
By default the config file lookup directory is the current working path.
The relative path CONFIG_ENTRY can be defined before including.
cpp
#define CONFIG_ENTRY "configs\\"
// this translates to "process_cwd/configs/"
#include "DKUtil/Config.hpp"