Loading...
Searching...
No Matches
CLI::Config Class Referenceabstract

This class provides a converter for configuration files. More...

`#include <ConfigFwd.hpp>`

Inheritance diagram for CLI::Config:

## Public Member Functions

virtual std::string | to_config (const App *, bool, bool, std::string) const =0
| Convert an app into a configuration.
virtual std::vector< ConfigItem > | from_config (std::istream &) const =0
| Convert a configuration into an app.
virtual CLI11_NODISCARD std::string | to_flag (const ConfigItem &item) const
| Get a flag value.
CLI11_NODISCARD std::vector< ConfigItem > | from_file (const std::string &name) const
| Parse a config file, throw an error (ParseError:ConfigParseError or FileError) on failure.
virtual | ~Config ()=default
| Virtual destructor.

## Protected Attributes

std::vector< ConfigItem > | items {}

## Detailed Description

This class provides a converter for configuration files.

## Constructor & Destructor Documentation

## ~Config()

virtual CLI::Config::~Config | ( |  | ) |

virtual default

Virtual destructor.

## Member Function Documentation

## from_config()

virtual std::vector< ConfigItem > CLI::Config::from_config | ( | std::istream & |  | ) | const

pure virtual

Convert a configuration into an app.

Implemented in CLI::ConfigBase.

## from_file()

CLI11_NODISCARD std::vector< ConfigItem > CLI::Config::from_file | ( | const std::string & | name | ) | const

inline

Parse a config file, throw an error (ParseError:ConfigParseError or FileError) on failure.

## to_config()

virtual std::string CLI::Config::to_config | ( | const App * | ,
|  | bool | ,
|  | bool | ,
|  | std::string | ) const

pure virtual

Convert an app into a configuration.

Implemented in CLI::ConfigBase.

## to_flag()

virtual CLI11_NODISCARD std::string CLI::Config::to_flag | ( | const ConfigItem & | item | ) | const

inline virtual

Get a flag value.

## Member Data Documentation

## items

std::vector<ConfigItem> CLI::Config::items {}

protected

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

- include/CLI/ConfigFwd.hpp