 |
Exiv2
|
8 #ifndef __INIREADER_H__
9 #define __INIREADER_H__
11 #include "exiv2lib_export.h"
38 const char* name,
const char* value);
41 typedef 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 ";"
113 #ifndef INI_USE_STACK
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
198 std::map<std::string, std::string> _values;
200 static int ValueHandler(
void* user,
const char* section,
const char* name,
205 #endif // __INIREADER_H__
bool GetBoolean(std::string section, std::string name, bool default_value)
Get a boolean value from INI file, returning default_value if not found or if not a valid true/false ...
Definition: ini.cpp:246
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
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 ParseError()
Return the result of ini_parse(), i.e., 0 on success, line number of first error on parse error,...
Definition: ini.cpp:216
std::string Get(std::string section, std::string name, std::string default_value)
Get a string value from INI file, returning default_value if not found.
Definition: ini.cpp:221
double GetReal(std::string section, std::string name, double default_value)
Get a real (floating point double) value from INI file, returning default_value if not found or not a...
Definition: ini.cpp:237
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
char *(* ini_reader)(char *str, int num, void *stream)
Typedef for prototype of fgets-style reader function.
Definition: ini.hpp:41
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
Read an INI file into easy-to-access name/value pairs. (Note that I've gone for simplicity here rathe...
Definition: ini.hpp:137
@ string
IPTC string type.
Definition: types.hpp:147
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
long GetInteger(std::string section, std::string name, long default_value)
Get an integer (long) value from INI file, returning default_value if not found or not a valid intege...
Definition: ini.cpp:227
INIReader(const std::string &filename)
Construct INIReader and parse given filename. See ini.h for more info about the parsing.
Definition: ini.cpp:211