#include <ConfigParser.h>
|
static std::string | format (const bool &value) |
|
static std::string | format (const int &value) |
|
static std::string | format (const float &value) |
|
static std::string | format (const std::string &value) |
|
static std::string | format (const std::vector< std::string > &values) |
|
static std::string | format (const std::set< std::string > &values) |
|
static std::vector< std::string > | splitCsvTopLevel (const std::string &basicString) |
|
A lightweight HOCON parser and formatter
◆ ConfigParser() [1/2]
ConfigParser::ConfigParser |
( |
const std::string & |
input | ) |
|
|
explicit |
Parse a HOCON string into a ConfigMap
- Parameters
-
input | The HOCON string to parse |
- Returns
- The parsed ConfigMap
◆ ConfigParser() [2/2]
ConfigParser::ConfigParser |
( |
const std::string & |
input, |
|
|
const ConfigParser & |
defaults |
|
) |
| |
Parse a HOCON string into a ConfigMap
- Parameters
-
input | The HOCON string to parse |
defaults | The default values to use |
- Returns
- The parsed ConfigMap
◆ format() [1/6]
std::string ConfigParser::format |
( |
const bool & |
value | ) |
|
|
static |
Format a bool value as a string
- Parameters
-
- Returns
- The string representation of the bool value
◆ format() [2/6]
std::string ConfigParser::format |
( |
const float & |
value | ) |
|
|
static |
Format a float value as a string
- Parameters
-
- Returns
- The string representation of the float value
◆ format() [3/6]
std::string ConfigParser::format |
( |
const int & |
value | ) |
|
|
static |
Format an integer value as a string
- Parameters
-
- Returns
- The string representation of the integer value
◆ format() [4/6]
std::string ConfigParser::format |
( |
const std::set< std::string > & |
values | ) |
|
|
static |
Format a list of strings as a comma-separated list of quoted strings in square brackets
- Parameters
-
- Returns
◆ format() [5/6]
std::string ConfigParser::format |
( |
const std::string & |
value | ) |
|
|
static |
Format a string value as a (quoted) string
- Parameters
-
- Returns
- The string representation of the quoted string value
◆ format() [6/6]
std::string ConfigParser::format |
( |
const std::vector< std::string > & |
values | ) |
|
|
static |
Format a list of strings as a comma-separated list of quoted strings in square brackets
- Parameters
-
- Returns
◆ getListValue()
Get a list value from a ConfigMap
- Parameters
-
key | The key of the value to get |
- Returns
- The list value
◆ getObjectValue()
Get a object value from a ConfigMap
- Parameters
-
key | The key of the value to get |
- Returns
- The object value
◆ getSingleValue()
Get a single value from a ConfigMap
- Parameters
-
key | The key of the value to get |
- Returns
- The single value
◆ operator=()
◆ operator==()
bool ConfigParser::operator== |
( |
const ConfigParser & |
other | ) |
const |
Compare two ConfigParsers for equality
- Parameters
-
- Returns
- true if equal
◆ splitCsvTopLevel()
std::vector< std::string > ConfigParser::splitCsvTopLevel |
( |
const std::string & |
basicString | ) |
|
|
static |
Split a CSV string into top-level pieces
- Parameters
-
basicString | The string to split |
- Returns
- The pieces
The documentation for this class was generated from the following files: