1#ifndef CAPIO_CL_PARSER_H
2#define CAPIO_CL_PARSER_H
3#include <jsoncons/basic_json.hpp>
4#include <jsoncons_ext/jsonschema/jsonschema.hpp>
26 [[nodiscard]]
const char *
what() const noexcept
override {
return message.c_str(); }
33 struct available_parsers {
44 static engine::Engine *parse_v1(
const std::filesystem::path &source,
45 const std::filesystem::path &resolve_prefix,
46 bool store_only_in_memory,
59 static engine::Engine *parse_v1_1(
const std::filesystem::path &source,
60 const std::filesystem::path &resolve_prefix,
61 bool store_only_in_memory,
70 static jsoncons::jsonschema::json_schema<jsoncons::json> loadSchema(
const char *data);
79 static std::filesystem::path
resolve(std::filesystem::path path,
80 const std::filesystem::path &prefix);
91 static void validate_json(
const jsoncons::json &doc,
const char *str_schema);
Load configuration and store it from a CAPIO-CL TOML configuration file.
Definition configuration.h:41
Engine for managing CAPIO-CL configuration entries. The CapioCLEngine class stores and manages config...
Definition engine.h:83
ParserException(const std::string &msg)
Construct a new CAPIO-CL Exception.
Definition Parser.cpp:10
const char * what() const noexcept override
Definition parser.h:26
Contains the code to parse a JSON based CAPIO-CL configuration file.
Definition parser.h:30
static std::filesystem::path resolve(std::filesystem::path path, const std::filesystem::path &prefix)
Definition Parser.cpp:22
static engine::Engine * parse(const configuration::CapioClConfiguration &config)
Definition Parser.cpp:56
static void validate_json(const jsoncons::json &doc, const char *str_schema)
Definition Parser.cpp:41
Namespace containing the CAPIO-CL parsers components.
Definition parser.h:7