28 #ifndef GNSS_SDR_INIREADER_H 29 #define GNSS_SDR_INIREADER_H 43 explicit INIReader(
const std::string& filename);
49 std::string
Get(
const std::string& section,
const std::string& name,
50 const std::string& default_value);
53 int64_t
GetInteger(
const std::string& section,
const std::string& name, int64_t default_value);
56 static std::string MakeKey(
const std::string& section,
const std::string& name);
57 static int ValueHandler(
void* user,
const char* section,
const char* name,
60 std::map<std::string, std::string> _values;
64 #endif // GNSS_SDR_INIREADER_H 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.
INIReader(const std::string &filename)
Construct INIReader and parse given filename. See ini.h for more info about the parsing.
Read an INI file into easy-to-access name/value pairs. (Note that I've gone for simplicity here rathe...
int ParseError()
Return the result of ini_parse(), i.e., 0 on success, line number of first error on parse error...
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.