WebFramework v3.0.12
Web framework for C++.
Loading...
Searching...
No Matches
framework::utility::JSONSettingsParser Class Reference

Parser for .json settings file. More...

#include <JSONSettingsParser.h>

Classes

struct  ExecutorSettings
 Settings for executor. More...
 

Public Member Functions

 JSONSettingsParser (const std::string &JSONSettings)
 Construct JSONSettingsParser from .json file.
 
 JSONSettingsParser (JSONSettingsParser &&other) noexcept=default
 Move constructor.
 
const std::unordered_map< std::string, ExecutorSettings > & getSettings () const
 Get all settings from .json.
 
const ExecutorSettingsgetExecutorSettings (const std::string &executorName) const
 Get settings for specific executor.
 

Detailed Description

Parser for .json settings file.

Definition at line 14 of file JSONSettingsParser.h.

Constructor & Destructor Documentation

◆ JSONSettingsParser() [1/2]

framework::utility::JSONSettingsParser::JSONSettingsParser ( const std::string & JSONSettings)

Construct JSONSettingsParser from .json file.

Parameters
JSONSettingspath to .json settings file
Exceptions
file_manager::exceptions::FileDoesNotExistException
std::runtime_error

◆ JSONSettingsParser() [2/2]

framework::utility::JSONSettingsParser::JSONSettingsParser ( JSONSettingsParser && other)
defaultnoexcept

Move constructor.

Parameters
otherAnother JSONSettingsParser

Member Function Documentation

◆ getExecutorSettings()

const JSONSettingsParser::ExecutorSettings & framework::utility::JSONSettingsParser::getExecutorSettings ( const std::string & executorName) const

Get settings for specific executor.

Parameters
executorNameexecutor class name
Returns

Definition at line 68 of file JSONSettingsParser.cpp.

◆ getSettings()

const unordered_map< string, JSONSettingsParser::ExecutorSettings > & framework::utility::JSONSettingsParser::getSettings ( ) const

Get all settings from .json.

Returns
route - settings as map

Definition at line 63 of file JSONSettingsParser.cpp.


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