sisi4s
|
This converter works with INI/TOML files; to write INI files use ConfigINI. More...
#include <CLI11.hpp>
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< ConfigItem > | from_config (std::istream &input) const override |
Convert a configuration into an app. | |
ConfigBase * | comment (char cchar) |
Specify the configuration for comment characters. | |
ConfigBase * | arrayBounds (char aStart, char aEnd) |
Specify the start and end characters for an array. | |
ConfigBase * | arrayDelimiter (char aSep) |
Specify the delimiter character for an array. | |
ConfigBase * | valueSeparator (char vSep) |
Specify the delimiter between a name and value. | |
ConfigBase * | quoteCharacter (char qString, char qChar) |
Specify the quote characters used around strings and characters. | |
ConfigBase * | maxLayers (uint8_t layers) |
Specify the maximum number of parents. | |
ConfigBase * | parentSeparator (char sep) |
Specify the separator to use for parent layers. | |
std::string & | sectionRef () |
get a reference to the configuration section | |
const std::string & | section () const |
get the section | |
ConfigBase * | section (const std::string §ionName) |
specify a particular section of the configuration file to use | |
int16_t & | indexRef () |
get a reference to the configuration index | |
int16_t | index () const |
get the section index | |
ConfigBase * | index (int16_t sectionIndex) |
specify a particular index in the section to use (-1) for all sections to use | |
![]() | |
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 std::string | to_flag (const ConfigItem &item) const |
Get a flag value. | |
std::vector< ConfigItem > | from_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 | |
uint8_t | maximumLayers {255} |
the maximum number of layers to allow | |
char | parentSeparatorChar {'.'} |
the separator used to separator parent layers | |
int16_t | configIndex {-1} |
Specify the configuration index to use for arrayed sections. | |
std::string | configSection {} |
Specify the configuration section that should be used. | |
![]() | |
std::vector< ConfigItem > | items {} |
This converter works with INI/TOML files; to write INI files use ConfigINI.
|
inline |
Specify the start and end characters for an array.
|
inline |
Specify the delimiter character for an array.
|
inline |
Specify the configuration for comment characters.
|
inlineoverridevirtual |
Convert a configuration into an app.
Implements CLI::Config.
|
inline |
get the section index
|
inline |
specify a particular index in the section to use (-1) for all sections to use
|
inline |
get a reference to the configuration index
|
inline |
Specify the maximum number of parents.
|
inline |
Specify the separator to use for parent layers.
|
inline |
Specify the quote characters used around strings and characters.
|
inline |
get the section
|
inline |
specify a particular section of the configuration file to use
|
inline |
get a reference to the configuration section
|
inlineoverridevirtual |
Convert an app into a configuration.
Implements CLI::Config.
|
inline |
Specify the delimiter between a name and value.
|
protected |
the character used to end an array '\0' is a default to not use
|
protected |
the character used to separate elements in an array
|
protected |
the character used to start an array '\0' is a default to not use
|
protected |
the character to use around single characters
|
protected |
the character used for comments
|
protected |
Specify the configuration index to use for arrayed sections.
|
protected |
Specify the configuration section that should be used.
|
protected |
the maximum number of layers to allow
|
protected |
the separator used to separator parent layers
|
protected |
the character to use around strings
|
protected |
the character used separate the name from the value