Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/ini.h>
Classes | |
class | Iterator |
Public Member Functions | |
const string & | name (void) const |
string | get (const string &key) const |
string | operator[] (const string &key) const |
bool | isDefined (const string &key) const |
string | get (const string &key, const string &def) const |
int | getInt (const string &key, int def) |
void | getList (const string &key, Vector< string > &list) |
Data in ".INI" files are grouped by sections containing a set if key/value pairs.
name | Name of looked section. |
References ListMap< K, T, C, E, A >::get().
Referenced by Section::get(), Section::getInt(), Section::getList(), and Section::operator[]().
Get a value and possibly a default value if not defined.
key | Key to look for. |
def | Default value. |
References Section::get(), and ListMap< K, T, C, E, A >::hasKey().
int getInt | ( | const string & | key, |
int | def | ||
) |
Get a value and transform it to integer.
key | Looked key. |
def | Default value if the key is not defined or if the conversion fails. |
References Section::get().
References Section::get(), String::indexOf(), elm::io::list(), elm::io::p(), and String::substring().
Test if a key/value pair is defined.
key | Key to test. |
References ListMap< K, T, C, E, A >::hasKey().
string Section::get(const string& key) const; Get the value associated with the given key or an empty string if it is not defined.
key | Key of the looked value. |
Alias to get().
Alias to get().
References Section::get().