CLI11  1.9.1
Public Member Functions | Protected Attributes | List of all members
CLI::ConfigBase Class Reference

This converter works with INI/TOML files; to write proper TOML files use ConfigTOML. More...

#include <ConfigFwd.hpp>

Inheritance diagram for CLI::ConfigBase:
CLI::Config CLI::ConfigTOML

Public Member Functions

std::string to_config (const App *, bool default_also, bool write_description, std::string prefix) const override
 Convert an app into a configuration. More...
 
std::vector< ConfigItemfrom_config (std::istream &input) const override
 Convert a configuration into an app. More...
 
ConfigBasecomment (char cchar)
 Specify the configuration for comment characters. More...
 
ConfigBasearrayBounds (char aStart, char aEnd)
 Specify the start and end characters for an array. More...
 
ConfigBasearrayDelimiter (char aSep)
 Specify the delimiter character for an array. More...
 
ConfigBasevalueSeparator (char vSep)
 Specify the delimiter between a name and value. More...
 
- Public Member Functions inherited from CLI::Config
virtual std::string to_flag (const ConfigItem &item) const
 Get a flag value. More...
 
std::vector< ConfigItemfrom_file (const std::string &name)
 Parse a config file, throw an error (ParseError:ConfigParseError or FileError) on failure. More...
 
virtual ~Config ()=default
 Virtual destructor. More...
 

Protected Attributes

char commentChar = ';'
 the character used for comments More...
 
char arrayStart = '\0'
 the character used to start an array '\0' is a default to not use More...
 
char arrayEnd = '\0'
 the character used to end an array '\0' is a default to not use More...
 
char arraySeparator = ' '
 the character used to separate elements in an array More...
 
char valueDelimiter = '='
 the character used separate the name from the value More...
 
- Protected Attributes inherited from CLI::Config
std::vector< ConfigItemitems {}
 

Detailed Description

This converter works with INI/TOML files; to write proper TOML files use ConfigTOML.

Member Function Documentation

◆ arrayBounds()

ConfigBase* CLI::ConfigBase::arrayBounds ( char  aStart,
char  aEnd 
)
inline

Specify the start and end characters for an array.

◆ arrayDelimiter()

ConfigBase* CLI::ConfigBase::arrayDelimiter ( char  aSep)
inline

Specify the delimiter character for an array.

◆ comment()

ConfigBase* CLI::ConfigBase::comment ( char  cchar)
inline

Specify the configuration for comment characters.

◆ from_config()

std::vector< ConfigItem > CLI::ConfigBase::from_config ( std::istream &  ) const
inlineoverridevirtual

Convert a configuration into an app.

Implements CLI::Config.

◆ to_config()

std::string CLI::ConfigBase::to_config ( const App ,
bool  ,
bool  ,
std::string   
) const
inlineoverridevirtual

Convert an app into a configuration.

Implements CLI::Config.

◆ valueSeparator()

ConfigBase* CLI::ConfigBase::valueSeparator ( char  vSep)
inline

Specify the delimiter between a name and value.

Member Data Documentation

◆ arrayEnd

char CLI::ConfigBase::arrayEnd = '\0'
protected

the character used to end an array '\0' is a default to not use

◆ arraySeparator

char CLI::ConfigBase::arraySeparator = ' '
protected

the character used to separate elements in an array

◆ arrayStart

char CLI::ConfigBase::arrayStart = '\0'
protected

the character used to start an array '\0' is a default to not use

◆ commentChar

char CLI::ConfigBase::commentChar = ';'
protected

the character used for comments

◆ valueDelimiter

char CLI::ConfigBase::valueDelimiter = '='
protected

the character used separate the name from the value


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