openPMD-api
 
Loading...
Searching...
No Matches
openPMD::json::JsonMatcher Class Reference

Class to handle default and dataset-specific JSON configurations. More...

#include <JSONMatcher.hpp>

Public Member Functions

 JsonMatcher ()
 For default construction.
 
 JsonMatcher (openPMD::json::TracingJSON config)
 Initialize JSON matcher from a parsed JSON config.
 
auto get (std::string const &datasetPath, std::string const &backendName) -> ParsedConfig
 Get the JSON config associated with a regex pattern.
 
auto getDefault (std::string const &backendName) -> TracingJSON
 Get the default JSON config.
 
auto initBackendLazily (std::string const &backendName) -> void
 

Detailed Description

Class to handle default and dataset-specific JSON configurations.

This class handles parsing of the extended JSON patterns as well as selection of one JSON configuration by regex.

Constructor & Destructor Documentation

◆ JsonMatcher()

openPMD::json::JsonMatcher::JsonMatcher ( openPMD::json::TracingJSON config)

Initialize JSON matcher from a parsed JSON config.

Will go through the backends' configurations (keys defined by backendKeys in JSON_internal.hpp) and check for dataset-specific configurations. It will then construct:

  1. A default configuration.
  2. Matchers for retrieving dataset-specific configurations.
Parameters
configThe parsed JSON configuration as specified by the user.

Member Function Documentation

◆ get()

auto openPMD::json::JsonMatcher::get ( std::string const & datasetPath,
std::string const & backendName ) -> ParsedConfig

Get the JSON config associated with a regex pattern.

Parameters
datasetPathThe regex.
backendNameThe backend name for which to resolve the pattern.
Returns
The matched JSON configuration, as a string.

◆ getDefault()

auto openPMD::json::JsonMatcher::getDefault ( std::string const & backendName) -> TracingJSON

Get the default JSON config.

Parameters
backendNameThe backend name for which to resolve the pattern.
Returns
The default JSON configuration.

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