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< std::optional< 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.
 
virtual std::vector< std::string > getAllKeys () const =0
 Retrieves all keys in the 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.

◆ getAllKeys()

virtual std::vector< std::string > util::config::ConfigFileInterface::getAllKeys ( ) const
pure virtual

Retrieves all keys in the configuration file.

Returns
A vector of all keys in the configuration file.

Implemented in util::config::ConfigFileJson.

◆ getArray()

virtual std::vector< std::optional< 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 some of which could be nullopt

Implemented in util::config::ConfigFileJson.

◆ 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 associated with key.

Implemented in util::config::ConfigFileJson.


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