From c1ad3223a1c7ac9d85fa4057c4d43123544e1b5a Mon Sep 17 00:00:00 2001 From: Alexander Baldeck Date: Sun, 26 Dec 2004 05:52:24 +0000 Subject: added some doxgen comments --- src/configuration.cpp | 14 ++++++++++++++ src/configuration.h | 5 +++++ 2 files changed, 19 insertions(+) (limited to 'src') diff --git a/src/configuration.cpp b/src/configuration.cpp index 011e8787..4c67a9f4 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -22,6 +22,10 @@ #include "configuration.h" +/** + \brief read INI file and parse all options into memory + \param filename full path to INI file (~/.manaworld/tmw.ini) +*/ void Configuration::Init(std::string filename) { inFile.open(filename.c_str(), std::ifstream::in); std::string inBuffer; @@ -63,6 +67,11 @@ bool Configuration::setValue(std::string, std::string) { return true; } +/** + \brief get a value as string + \param key option identifier + \param deflt default option if not there or error +*/ std::string Configuration::getValue(std::string key, std::string deflt) { INI_OPTION optionTmp; for (iter = iniOptions.begin(); iter != iniOptions.end(); iter++) { @@ -74,6 +83,11 @@ std::string Configuration::getValue(std::string key, std::string deflt) { return deflt; } +/** + \brief get a value as numeric value (float) + \param key option identifier + \param deflt default option if not there or error +*/ float Configuration::getValue(std::string key, float deflt) { INI_OPTION optionTmp; for (iter = iniOptions.begin(); iter != iniOptions.end(); iter++) { diff --git a/src/configuration.h b/src/configuration.h index 98c17be9..e3e5b9aa 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -30,6 +30,11 @@ #include #include +/** + * INI configuration handler for reading (and writing) + * + * \ingroup CORE + */ class Configuration { public: void Init(std::string); -- cgit v1.2.3-70-g09d2