CAPIO-CL 1.2.0
CAPIO-CL: Cross Application Programmable I/O - Coordination Language
Loading...
Searching...
No Matches
capiocl::parser::Parser Class Referencefinal

Contains the code to parse a JSON based CAPIO-CL configuration file. More...

#include <parser.h>

Static Public Member Functions

static void validate_json (const jsoncons::json &doc, const char *str_schema)
static engine::Engineparse (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 Protected Member Functions

static std::filesystem::path resolve (std::filesystem::path path, const std::filesystem::path &prefix)

Detailed Description

Contains the code to parse a JSON based CAPIO-CL configuration file.

Member Function Documentation

◆ 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
sourceInput CAPIO-CL Json configuration File
resolve_prefixIf paths are found to be relative, they are appended to this path
store_only_in_memorySet to true to set all files to be stored in memory
Returns
Engine instance with the information provided by the config file
Exceptions
ParserException

◆ 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
pathPath to resolve
prefixPrefix
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
docThe loaded CAPIO-CL configuration file
str_schemaRaw JSON schema to use

The documentation for this class was generated from the following files: