![]() |
PIDUINO
|
#include <configfile.h>
Public Member Functions | |
ConfigFile (const std::string &filename, char keysep='=', char remsep='#') | |
bool | keyExists (const std::string &key) const |
template<typename ValueType > | |
ValueType | value (const std::string &key, ValueType const &defaultValue=ValueType()) const |
std::string | value (const std::string &key, std::string const &defaultValue=std::string()) const |
Private Member Functions | |
void | removeComment (std::string &line) const |
bool | onlyWhitespace (const std::string &line) const |
bool | validLine (const std::string &line) const |
void | extractKey (std::string &key, size_t const &sepPos, const std::string &line) const |
void | extractValue (std::string &value, size_t const &sepPos, const std::string &line) const |
void | extractContents (const std::string &line) |
void | parseLine (const std::string &line, size_t const lineNo) |
void | extractKeys (const std::string &filename) |
Static Private Member Functions | |
static void | trim (std::string &str) |
Private Attributes | |
std::map< std::string, std::string > | _contents |
char | _keysep |
char | _remsep |
Definition at line 64 of file configfile.h.
|
inline |
Definition at line 68 of file configfile.h.
References extractKeys().
|
inlineprivate |
Definition at line 182 of file configfile.h.
References _contents, _keysep, extractKey(), extractValue(), keyExists(), and value().
Referenced by parseLine().
|
inlineprivate |
Definition at line 157 of file configfile.h.
References trim().
Referenced by extractContents().
|
inlineprivate |
Definition at line 214 of file configfile.h.
References onlyWhitespace(), parseLine(), and removeComment().
Referenced by ConfigFile().
|
inlineprivate |
Definition at line 166 of file configfile.h.
References trim(), and value().
Referenced by extractContents().
|
inline |
Definition at line 76 of file configfile.h.
References _contents.
Referenced by extractContents(), value(), and value().
|
inlineprivate |
Definition at line 120 of file configfile.h.
Referenced by extractKeys().
|
inlineprivate |
Definition at line 201 of file configfile.h.
References _keysep, extractContents(), and validLine().
Referenced by extractKeys().
|
inlineprivate |
|
inlinestaticprivate |
Definition at line 149 of file configfile.h.
Referenced by extractKey(), and extractValue().
|
inlineprivate |
|
inline |
Definition at line 94 of file configfile.h.
References _contents, and keyExists().
|
inline |
Definition at line 82 of file configfile.h.
References _contents, keyExists(), and Piduino::Convert::string_to_T().
Referenced by extractContents(), and extractValue().
|
private |
Definition at line 105 of file configfile.h.
Referenced by extractContents(), keyExists(), value(), and value().
|
private |
Definition at line 106 of file configfile.h.
Referenced by extractContents(), parseLine(), and validLine().
|
private |
Definition at line 107 of file configfile.h.
Referenced by removeComment().