From 22068252231740cdeed6343730b75451c5b787b1 Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Sat, 2 Nov 2024 17:31:19 +0800 Subject: [PATCH] doc: add document for the change of loading function of ConfigManager. --- doc/src/config_manager.dox | 64 +++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/doc/src/config_manager.dox b/doc/src/config_manager.dox index 536f25c..f5b430c 100644 --- a/doc/src/config_manager.dox +++ b/doc/src/config_manager.dox @@ -86,12 +86,66 @@ so it must be initialized after initializing all settings. When initializing core manager, you need assign config file path first. Then you need specify a version number. -Version number will be used when reading config file. -If the version of config file is higher than your given number, -core manager will assume you are trying to read a config file created by a higher version program. -Core manager will reject reading and use default value for all settings. -Otherwise, core manager will try to read config file and do proper migration if possible. +Version number is important. +It will be used when reading config file and only can be increased if needed (version can not downgrade). The last argument is an initializer list which contain the \b pointer to all settings this manager managed. +When executing YYCC::ConfigManager::CoreManager::Load to load configs, it will perform following steps one by one: + + + +All of these scenarios can be found by the return value of loading function. +The return type of loading function, ConfigLoadResult is a flag enum. +You can find whether loading process happend specified issue by using bitwise operation on it. + */ } \ No newline at end of file