Skip to content

v3.0.0

Latest
Compare
Choose a tag to compare
@kamchatka-volcano kamchatka-volcano released this 19 Jan 19:11
  • Enabled the registration of configs without the need for the figcone::Config base class and macros. (requires C++20)
    Readme
  • Added support for node lists as the root of the document in JSON and YAML config formats. If your config root can contain a node list, pass the figcone::RootType::NodeList value as the second template argument of the figcone::ConfigReader read methods:
auto cfgList = cfgReader.readYamlFile<PhotoViewerCfg, figcone::RootType::NodeList>("cfg.yaml"); // cfgList type is std::vector<PhotoViewerCfg>
  • Improved XML support: node lists no longer require the _list="1" attribute, and their child elements don't have to be named as _. These constraints were previously necessary due to the inability in XML format to distinguish between a node with a single child node and a list with a single element:
<box>
  <child/>
</box>

Now, the tag can be registered as both a node and a node list without raising parsing errors. (Closes #12)

  • Added unregistered fields handlers - specializations that allow to change the performed action when the configuration contains unregistered filed names. By default, figcone throws exceptions in these cases, but now it's possible to ignore unregistered fields. (Closes #16)
    Readme
  • Added post processors - specializations that enable checking or changing the state of the config object after it has been read.
    Readme
  • BREAKING Improved optional field validators; they now take parameters by the contained value of std::optional, and they are not invoked when the field is empty.
  • Added <figcone/figcone.h> header that contains all necessary includes.
  • Bundled the nameof library by default. (FIGCONE_USE_NAMEOF is enabled by default)