diff --git a/src/common/configuration.h b/src/common/configuration.h index 128cddaf..c2ba393c 100644 --- a/src/common/configuration.h +++ b/src/common/configuration.h @@ -21,8 +21,11 @@ #endif #include +#include #include +#include "bitsery/ext/boost-path.h" + /** * An object that's used to provide plugin-specific configuration. Right now * this is only used to declare plugin groups. A plugin group is a set of @@ -86,4 +89,14 @@ class Configuration { * The matched glob pattern in the above configuration file. */ std::optional matched_pattern; + + template + void serialize(S& s) { + s.ext(group, bitsery::ext::StdOptional(), + [](S& s, auto& v) { s.text1b(v, 4096); }); + s.ext(matched_file, bitsery::ext::StdOptional(), + [](S& s, auto& v) { s.ext(v, bitsery::ext::BoostPath()); }); + s.ext(matched_pattern, bitsery::ext::StdOptional(), + [](S& s, auto& v) { s.text1b(v, 4096); }); + } };