--- nono/lib/config.h 2026/04/29 17:05:15 1.1.1.6 +++ nono/lib/config.h 2026/04/29 17:05:18 1.1.1.7 @@ -179,6 +179,9 @@ class Config bool Add(const std::string& key, const std::string& value, VMCap vmcap = VMCap::ALL); + // エイリアスを追加 + bool AddAlias(const std::string& alias, const std::string& key); + // 項目を削除 void Delete(const std::string& key); @@ -194,6 +197,9 @@ class Config bool UpdateLine(const std::string& line, ConfigItem::from_t, const std::string& from); + // キーの正規名を返す + const std::string& GetCanonKey(const std::string& key) const; + // "key=val" 形式の行から key, val を取り出す。 static bool SplitKeyVal(std::string *keyp, std::string *valp, const std::string& line); @@ -201,6 +207,9 @@ class Config // 設定項目の集合 std::vector list {}; + // エイリアス(別名)の集合 + std::vector> aliases {}; + // 設定はある時点までは追加更新可能だが、途中からは読み込み専用としたい。 // プログラムミスを避けるため。 bool fixed {};