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

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

#include <CLI11.hpp>

Inheritance diagram for CLI::Config:
Collaboration 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< ConfigItemfrom_config (std::istream &) const =0
 Convert a configuration into an app.
 
virtual std::string to_flag (const ConfigItem &item) const
 Get a flag value.
 
std::vector< ConfigItemfrom_file (const std::string &name)
 Parse a config file, throw an error (ParseError:ConfigParseError or FileError) on failure.
 
virtual ~Config ()=default
 Virtual destructor.
 

Protected Attributes

std::vector< ConfigItemitems {}
 

Detailed Description

This class provides a converter for configuration files.

Constructor & Destructor Documentation

◆ ~Config()

virtual CLI::Config::~Config ( )
virtualdefault

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()

std::vector< ConfigItem > CLI::Config::from_file ( const std::string &  name)
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 std::string CLI::Config::to_flag ( const ConfigItem item) const
inlinevirtual

Get a flag value.

Here is the call graph for this function:

Member Data Documentation

◆ items

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

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