xentara-plugin v1.2.1
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::io::Component::FallbackConfigHandler Class Referenceabstract

A helper object used to handle config parameters unknown to the sub class. More...

#include <io/Component.hpp>

Public Member Functions

virtual ~FallbackConfigHandler ()=0
 Virtual destructor.
 
auto operator() (utils::json::decoder::Object::Member &member) const -> void
 Handles a single config parameter unknown to the sub class.
 
auto operator() (const utils::json::decoder::Name &name, utils::json::decoder::Value &value) const -> void
 Handles a single config parameter unknown to the sub class.
 
auto operator() (utils::json::decoder::Object &jsonObject) const -> void
 Handles the entire contents of the configuration.
 

Detailed Description

A helper object used to handle config parameters unknown to the sub class.

See also
Loading Element Configs
Examples
LoadingElementConfig.cpp

Constructor & Destructor Documentation

◆ ~FallbackConfigHandler()

xentara::io::Component::FallbackConfigHandler::~FallbackConfigHandler ( )
pure virtualdefault

Virtual destructor.

Member Function Documentation

◆ operator()() [1/3]

auto xentara::io::Component::FallbackConfigHandler::operator() ( const utils::json::decoder::Name name,
utils::json::decoder::Value value 
) const -> void

Handles a single config parameter unknown to the sub class.

You should call this operator from your implementation of loadConfig() for every object member you do not recognize.

Parameters
nameThe name of the member
valueThe value of the member
Exceptions
std::runtime_errorThe name of the member is not recognized, or the corresponding value is unsuitable

◆ operator()() [2/3]

auto xentara::io::Component::FallbackConfigHandler::operator() ( utils::json::decoder::Object jsonObject) const -> void

Handles the entire contents of the configuration.

You should call this operator from your implementation of loadConfig() if you do not have any configuration parameters of your own.

Parameters
jsonObjectThe JSON object that contains the microservice's configuration
Exceptions
std::runtime_errorThe configuration object copnatins an error

◆ operator()() [3/3]

auto xentara::io::Component::FallbackConfigHandler::operator() ( utils::json::decoder::Object::Member member) const -> void

Handles a single config parameter unknown to the sub class.

You should call this operator from your implementation of loadConfig() for every object member you do not recognize.

Parameters
memberThe value of the member
Exceptions
std::runtime_errorThe name is not recognized, or the value is unsuitable