Contains the code to parse a JSON based CAPIO-CL configuration file.
More...
#include <parser.h>
|
| static void | validate_json (const jsoncons::json &doc, const char *str_schema) |
| static engine::Engine * | parse (const std::filesystem::path &source, const std::filesystem::path &resolve_prefix="", bool store_only_in_memory=false) |
| | Perform the parsing of the capio_server configuration file.
|
|
| static std::filesystem::path | resolve (std::filesystem::path path, const std::filesystem::path &prefix) |
Contains the code to parse a JSON based CAPIO-CL configuration file.
◆ parse()
| capiocl::engine::Engine * capiocl::parser::Parser::parse |
( |
const std::filesystem::path & | source, |
|
|
const std::filesystem::path & | resolve_prefix = "", |
|
|
bool | store_only_in_memory = false ) |
|
static |
Perform the parsing of the capio_server configuration file.
- Parameters
-
| source | Input CAPIO-CL Json configuration File |
| resolve_prefix | If paths are found to be relative, they are appended to this path |
| store_only_in_memory | Set to true to set all files to be stored in memory |
- Returns
- Engine instance with the information provided by the config file
- Exceptions
-
◆ resolve()
| std::filesystem::path capiocl::parser::Parser::resolve |
( |
std::filesystem::path | path, |
|
|
const std::filesystem::path & | prefix ) |
|
staticprotected |
Resolve (if relative) a path to an absolute one using the provided prefix
- Parameters
-
| path | Path to resolve |
| prefix | Prefix |
- Returns
- Absolute path constructed from path
◆ validate_json()
| void capiocl::parser::Parser::validate_json |
( |
const jsoncons::json & | doc, |
|
|
const char * | str_schema ) |
|
static |
Validate a CAPIO-CL configuration file according to the JSON schema of the language
- Parameters
-
| doc | The loaded CAPIO-CL configuration file |
| str_schema | Raw JSON schema to use |
The documentation for this class was generated from the following files:
- /home/runner/work/CAPIO-CL/CAPIO-CL/capiocl/parser.h
- /home/runner/work/CAPIO-CL/CAPIO-CL/src/Parser.cpp