Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::config::ConfigFileInterface Class Referenceabstract

The interface for configuration files. More...

#include <ConfigFileInterface.hpp>

Inheritance diagram for util::config::ConfigFileInterface:

Public Member Functions

virtual Value getValue (std::string_view key) const =0
 Retrieves the value of configValue.
 
virtual std::vector< Value > getArray (std::string_view key) const =0
 Retrieves an array of configuration values.
 
virtual bool containsKey (std::string_view key) const =0
 Checks if key exist in configuration file.
 

Detailed Description

The interface for configuration files.

This class defines the interface for handling configuration files, which can be implemented for different formats such as JSON or YAML.

Member Function Documentation

◆ containsKey()

virtual bool util::config::ConfigFileInterface::containsKey ( std::string_view key) const
pure virtual

Checks if key exist in configuration file.

Parameters
keyThe key to search for.
Returns
true if key exists in configuration file, false otherwise.

Implemented in util::config::ConfigFileJson, and util::config::ConfigFileYaml.

◆ getArray()

virtual std::vector< Value > util::config::ConfigFileInterface::getArray ( std::string_view key) const
pure virtual

Retrieves an array of configuration values.

Parameters
keyThe key of the configuration array.
Returns
A vector of configuration values if found, otherwise std::nullopt.

Implemented in util::config::ConfigFileJson, and util::config::ConfigFileYaml.

◆ getValue()

virtual Value util::config::ConfigFileInterface::getValue ( std::string_view key) const
pure virtual

Retrieves the value of configValue.

Parameters
keyThe key of configuration.
Returns
the value assosiated with key.

Implemented in util::config::ConfigFileJson, and util::config::ConfigFileYaml.


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