28#ifndef GNSS_SDR_INIREADER_H
29#define GNSS_SDR_INIREADER_H
55 std::string
Get(
const std::string& section,
const std::string& name,
56 const std::string& default_value);
59 int64_t
GetInteger(
const std::string& section,
const std::string& name, int64_t default_value);
65 bool HasValue(
const std::string& section,
const std::string& name)
const;
68 static std::string MakeKey(
const std::string& section,
const std::string& name);
69 static int ValueHandler(
void* user,
const char* section,
const char* name,
72 std::map<std::string, std::string> _values;
INIReader(const std::string &filename)
Construct INIReader and parse given filename. See ini.h for more info about the parsing.
std::string Get(const std::string §ion, const std::string &name, const std::string &default_value)
Get a string value from INI file, returning default_value if not found.
int ParseError() const
Return the result of ini_parse(), i.e., 0 on success, line number of first error on parse error,...
int64_t GetInteger(const std::string §ion, const std::string &name, int64_t default_value)
Get an integer (long) value from INI file, returning default_value if not found.
bool HasSection(const std::string §ion) const
Return true if the given section exists (section must contain at least one name=value pair).
bool HasValue(const std::string §ion, const std::string &name) const
Return true if a value exists with the given section and field names.