Ase::IniFile class

Class to parse INI configuration file sections and values.

This class parses configuration files, commonly known as INI files. The files contain "[Section]" markers and "attribute=value" definitions. Comment lines are preceeded by a hash "#" sign. For a detailed reference, see: http://wikipedia.org/wiki/INI_file
To write INI files, refer to the IniWriter class. Localization of attributes is supported with the "attribute[locale]=value" syntax, in accordance with the desktop file spec: http://freedesktop.org/Standards/desktop-entry-spec
Example:

[Section]
  key = value  # definition of Section.key = "value"
  name = "quoted string with \n newlines and spaces"

Public static functions

static auto cook_string(const String& input_string) →  String
Unquote contents of input_string

Constructors, destructors, conversion operators

IniFile(const String& name, const String& inidata) explicit
Load INI file from immediate data.
IniFile(Blob blob) explicit
Load INI file from Blob.
IniFile(const IniFile& source) explicit
Copy constructor.

Public functions

auto attributes(const String& section) const →  StringS
List all attributes available in section.
auto has_attribute(const String& section, const String& key) const →  bool
Return if section contains key.
auto has_raw_value(const String& dotpath, String* valuep = NULL) const →  bool
Check and possibly retrieve raw value if present.
auto has_section(const String& section) const →  bool
Check presence of a section.
auto has_sections() const →  bool
Checks if IniFile is non-empty.
auto has_value(const String& dotpath, String* valuep = NULL) const →  bool
Check and possibly retrieve value if present.
auto operator=(const IniFile& source) →  IniFile&
Assignment operator.
auto raw_value(const String& dotpath) const →  String
Retrieve raw (uncooked) value of section.attribute[locale].
auto raw_values() const →  StringS
List all section.attribute=value pairs.
auto sections() const →  StringS
List all sections.
auto value_as_string(const String& dotpath) const →  String
Retrieve value of section.attribute[locale].