7 #ifndef _FCITX_CONFIG_OPTION_DETAILS_H_ 8 #define _FCITX_CONFIG_OPTION_DETAILS_H_ 13 #include <fcitx-config/fcitxconfig_export.h> 14 #include <fcitx-config/rawconfig.h> 23 std::string description);
26 const std::string &path()
const;
27 const std::string &description()
const;
28 virtual std::string typeString()
const = 0;
29 virtual void reset() = 0;
30 virtual bool isDefault()
const = 0;
32 virtual void marshall(
RawConfig &config)
const = 0;
33 virtual bool unmarshall(
const RawConfig &config,
bool partial) = 0;
34 virtual std::unique_ptr<Configuration> subConfigSkeleton()
const = 0;
36 virtual bool equalTo(
const OptionBase &other)
const = 0;
37 virtual void copyFrom(
const OptionBase &other) = 0;
38 bool operator==(
const OptionBase &other)
const {
return equalTo(other); }
39 bool operator!=(
const OptionBase &other)
const {
40 return !operator==(other);
43 virtual bool skipDescription()
const = 0;
44 virtual bool skipSave()
const = 0;
45 virtual void dumpDescription(
RawConfig &config)
const;
50 std::string description_;
55 using OptionBase::OptionBase;
56 virtual void syncDefaultValueToCurrent() = 0;
61 using OptionBaseV2::OptionBaseV2;
72 using type =
typename RemoveVector<T>::type;
76 void dumpDescriptionHelper(
RawConfig & , T * ) {}
80 #endif // _FCITX_CONFIG_OPTION_DETAILS_H_