rippled
|
Holds unparsed configuration information. More...
Public Member Functions | |
bool | exists (std::string const &name) const |
Returns true if a section with the given name exists. More... | |
void | overwrite (std::string const §ion, std::string const &key, std::string const &value) |
Overwrite a key/value pair with a command line argument If the section does not exist it is created. More... | |
void | deprecatedClearSection (std::string const §ion) |
Remove all the key/value pairs from the section. More... | |
void | legacy (std::string const §ion, std::string value) |
Set a value that is not a key/value pair. More... | |
std::string | legacy (std::string const §ionName) const |
Get the legacy value of a section. More... | |
bool | had_trailing_comments () const |
Protected Member Functions | |
void | build (IniFileSections const &ifs) |
Private Attributes | |
std::map< std::string, Section, boost::beast::iless > | map_ |
Friends | |
std::ostream & | operator<< (std::ostream &ss, BasicConfig const &c) |
Holds unparsed configuration information.
The raw data sections are processed with intermediate parsers specific to each module instead of being all parsed in a central location.
Definition at line 215 of file BasicConfig.h.
bool ripple::BasicConfig::exists | ( | std::string const & | name | ) | const |
Returns true
if a section with the given name exists.
Definition at line 121 of file BasicConfig.cpp.
Section & ripple::BasicConfig::section | ( | std::string const & | name | ) |
Returns the section with the given name.
If the section does not exist, an empty section is returned.
Definition at line 127 of file BasicConfig.cpp.
Section const & ripple::BasicConfig::section | ( | std::string const & | name | ) | const |
Definition at line 133 of file BasicConfig.cpp.
Section const& ripple::BasicConfig::operator[] | ( | std::string const & | name | ) | const |
Definition at line 236 of file BasicConfig.h.
Section& ripple::BasicConfig::operator[] | ( | std::string const & | name | ) |
Definition at line 242 of file BasicConfig.h.
void ripple::BasicConfig::overwrite | ( | std::string const & | section, |
std::string const & | key, | ||
std::string const & | value | ||
) |
Overwrite a key/value pair with a command line argument If the section does not exist it is created.
The previous value, if any, is overwritten.
Definition at line 143 of file BasicConfig.cpp.
void ripple::BasicConfig::deprecatedClearSection | ( | std::string const & | section | ) |
Remove all the key/value pairs from the section.
Definition at line 156 of file BasicConfig.cpp.
void ripple::BasicConfig::legacy | ( | std::string const & | section, |
std::string | value | ||
) |
Set a value that is not a key/value pair.
The value is stored as the section's first value and may be retrieved through section::legacy.
section | Name of the section to modify. |
value | Contents of the legacy value. |
Definition at line 164 of file BasicConfig.cpp.
std::string ripple::BasicConfig::legacy | ( | std::string const & | sectionName | ) | const |
Get the legacy value of a section.
A section with a single-line value may be retrieved as a legacy value.
sectionName | Retrieve the contents of this section's legacy value. |
Definition at line 170 of file BasicConfig.cpp.
bool ripple::BasicConfig::had_trailing_comments | ( | ) | const |
Definition at line 292 of file BasicConfig.h.
|
protected |
Definition at line 176 of file BasicConfig.cpp.
|
friend |
Definition at line 189 of file BasicConfig.cpp.
|
private |
Definition at line 218 of file BasicConfig.h.