11#include "exiv2lib_export.h"
38 const char* name,
const char* value);
41typedef char* (*ini_reader)(
char* str,
int num,
void* stream);
90#ifndef INI_ALLOW_MULTILINE
91#define INI_ALLOW_MULTILINE 1
98#define INI_ALLOW_BOM 1
105#ifndef INI_ALLOW_INLINE_COMMENTS
106#define INI_ALLOW_INLINE_COMMENTS 1
108#ifndef INI_INLINE_COMMENT_PREFIXES
109#define INI_INLINE_COMMENT_PREFIXES ";"
114#define INI_USE_STACK 1
118#ifndef INI_STOP_ON_FIRST_ERROR
119#define INI_STOP_ON_FIRST_ERROR 0
124#define INI_MAX_LINE 200
143 explicit INIReader(
const std::string& filename);
158 std::string Get(std::string section, std::string name,
159 std::string default_value);
170 long GetInteger(std::string section, std::string name,
long default_value);
182 double GetReal(std::string section, std::string name,
double default_value);
194 bool GetBoolean(std::string section, std::string name,
bool default_value);
198 std::map<std::string, std::string> _values;
199 static std::string MakeKey(std::string section, std::string name);
200 static int ValueHandler(
void* user,
const char* section,
const char* name,
Read an INI file into easy-to-access name/value pairs. (Note that I've gone for simplicity here rathe...
Definition ini.hpp:138
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition asfvideo.hpp:36
int(* ini_handler)(void *user, const char *section, const char *name, const char *value)
typedef for prototype of handler function.
Definition ini.hpp:37
int ini_parse_stream(ini_reader reader, void *stream, ini_handler handler, void *user)
Same as ini_parse(), but takes an ini_reader function pointer instead of filename....
Definition ini.cpp:88
int ini_parse_file(FILE *file, ini_handler handler, void *user)
Same as ini_parse(), but takes a FILE* instead of filename. This doesn't close the file when it's fin...
Definition ini.cpp:192
int ini_parse(const char *filename, ini_handler handler, void *user)
Parse given INI-style file. May have [section]s, name=value pairs (whitespace stripped),...
Definition ini.cpp:198
char *(* ini_reader)(char *str, int num, void *stream)
Typedef for prototype of fgets-style reader function.
Definition ini.hpp:41