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

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

#include <CLI11.hpp>

Inheritance diagram for CLI::ConfigBase:
Inheritance graph
[legend]
Collaboration diagram for CLI::ConfigBase:
Collaboration graph
[legend]

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.
 
std::vector< ConfigItemfrom_config (std::istream &input) const override
 Convert a configuration into an app.
 
ConfigBasecomment (char cchar)
 Specify the configuration for comment characters.
 
ConfigBasearrayBounds (char aStart, char aEnd)
 Specify the start and end characters for an array.
 
ConfigBasearrayDelimiter (char aSep)
 Specify the delimiter character for an array.
 
ConfigBasevalueSeparator (char vSep)
 Specify the delimiter between a name and value.
 
ConfigBasequoteCharacter (char qString, char qChar)
 Specify the quote characters used around strings and characters.
 
- Public Member Functions inherited from CLI::Config
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

char commentChar = '#'
 the character used for comments
 
char arrayStart = '['
 the character used to start an array '\0' is a default to not use
 
char arrayEnd = ']'
 the character used to end an array '\0' is a default to not use
 
char arraySeparator = ','
 the character used to separate elements in an array
 
char valueDelimiter = '='
 the character used separate the name from the value
 
char stringQuote = '"'
 the character to use around strings
 
char characterQuote = '\''
 the character to use around single characters
 
- Protected Attributes inherited from CLI::Config
std::vector< ConfigItemitems {}
 

Detailed Description

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


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