ini file management class More...
#include <IniFile.h>
Classes | |
| class | IniFileManager |
| IniFile object management class. More... | |
Public Member Functions | |
| const char * | getFilePath () |
| gets file path More... | |
| bool | decryptPassword (const char *pcPassword, char *pcDecrypt, const size_t szDecrypt) |
| decrypt password More... | |
| bool | encryptPassword (const char *pcPassword, char *pcEncrypt, const size_t szEncrypt) |
| decrypt password More... | |
| void | setString (const char *section, const char *key, const char *value) |
| sets string value More... | |
| const char * | getString (const char *section, const char *key, const char *defaultValue) |
| gets string value More... | |
| void | setBool (const char *section, const char *key, const bool value) |
| sets boolean value More... | |
| bool | getBool (const char *section, const char *key, const bool defaultValue) |
| gets boolean value More... | |
| void | setInt (const char *section, const char *key, const int value) |
| sets integer number value More... | |
| int | getInt (const char *section, const char *key, const int defaultValue) |
| get integer number value More... | |
| void | setDouble (const char *section, const char *key, const double value) |
| sets real number value More... | |
| double | getDouble (const char *section, const char *key, const double defaultValue) |
| gets real number value More... | |
| void | deleteValue (const char *section, const char *key) |
| deletes value More... | |
| unsigned int | getNumberOfSections () |
| gets the number of sections More... | |
| const char * | getSection (const unsigned int index) |
| gets section More... | |
| unsigned int | getNumberOfParameters (const char *section) |
| gets the number of parameters specified section More... | |
| const char * | getParameterName (const char *section, const unsigned int index) |
| gets parameter name More... | |
| const char * | getParameterValue (const char *section, const unsigned int index) |
| gets parameter value More... | |
| bool | load (const char *path) |
| load the ini file More... | |
| bool | save (const char *path=NULL) |
| save the ini file More... | |
Static Public Member Functions | |
| static IniFile * | loadIniFile (const char *path) |
| loads ini file and gets IniFile object. More... | |
| static IniFile * | getIniFile (const char *path) |
| gets ini file object. If specified file is not opened, this method calls loadIniFile method. More... | |
| static void | saveAllIniFiles () |
| save all ini files | |
Protected Member Functions | |
| IniFile () | |
| constructor | |
| virtual | ~IniFile () |
| destructor | |
| Properties * | getProperties (const char *section) |
| gets properties object specified section More... | |
Protected Attributes | |
| std::string | m_filePath |
| std::vector< std::string > | m_sections |
| std::map< std::string, Properties > | m_sectionMap |
| bool kome::core::IniFile::decryptPassword | ( | const char * | pcPassword, |
| char * | pcDecrypt, | ||
| const size_t | szDecrypt | ||
| ) |
decrypt password
| [in] | pcPassword | encrypted password string |
| [in] | pcDecrypt | decrypted password string |
| [in] | szDecrypt | size of decrypt string buffer |
Definition at line 91 of file IniFile.cpp.
| void kome::core::IniFile::deleteValue | ( | const char * | section, |
| const char * | key | ||
| ) |
deletes value
| [in] | section | parameter section |
| [in] | key | parameter key |
Definition at line 277 of file IniFile.cpp.
| bool kome::core::IniFile::encryptPassword | ( | const char * | pcPassword, |
| char * | pcEncrypt, | ||
| const size_t | szEncrypt | ||
| ) |
decrypt password
| [in] | pcPassword | plain text password string |
| [in] | pcEncrypt | encrypted password string |
| [in] | szEncrypt | size of encrypt string buffer |
Definition at line 149 of file IniFile.cpp.
| bool kome::core::IniFile::getBool | ( | const char * | section, |
| const char * | key, | ||
| const bool | defaultValue | ||
| ) |
gets boolean value
| [in] | section | parameter section |
| [in] | key | parameter key |
| [in] | defaultValue | default value |
Definition at line 221 of file IniFile.cpp.
| double kome::core::IniFile::getDouble | ( | const char * | section, |
| const char * | key, | ||
| const double | defaultValue | ||
| ) |
gets real number value
| [in] | section | parameter section |
| [in] | key | parameter key |
| [in] | defaultValue | default value |
Definition at line 319 of file IniFile.cpp.
| const char * kome::core::IniFile::getFilePath | ( | ) |
|
static |
gets ini file object. If specified file is not opened, this method calls loadIniFile method.
| [in] | path | ini file path. |
Definition at line 579 of file IniFile.cpp.

| int kome::core::IniFile::getInt | ( | const char * | section, |
| const char * | key, | ||
| const int | defaultValue | ||
| ) |
get integer number value
| [in] | section | parameter section |
| [in] | key | parameter key |
| [in] | defaultValue | default value |
Definition at line 249 of file IniFile.cpp.
| unsigned int kome::core::IniFile::getNumberOfParameters | ( | const char * | section | ) |
gets the number of parameters specified section
| [in] | section | parameter section |
Definition at line 348 of file IniFile.cpp.

| unsigned int kome::core::IniFile::getNumberOfSections | ( | ) |
gets the number of sections
Definition at line 333 of file IniFile.cpp.
| const char * kome::core::IniFile::getParameterName | ( | const char * | section, |
| const unsigned int | index | ||
| ) |
gets parameter name
| [in] | section | parameter section |
| [in] | index | parameter index |
Definition at line 360 of file IniFile.cpp.

| const char * kome::core::IniFile::getParameterValue | ( | const char * | section, |
| const unsigned int | index | ||
| ) |
gets parameter value
| [in] | section | parameter section |
| [in] | index | parameter index |
Definition at line 372 of file IniFile.cpp.

|
protected |
gets properties object specified section
| [in] | section | section |
Definition at line 303 of file IniFile.cpp.
| const char * kome::core::IniFile::getSection | ( | const unsigned int | index | ) |
gets section
| [in] | index | section index |
Definition at line 338 of file IniFile.cpp.
| const char * kome::core::IniFile::getString | ( | const char * | section, |
| const char * | key, | ||
| const char * | defaultValue | ||
| ) |
gets string value
| [in] | section | parameter section |
| [in] | key | parameter key |
| [in] | defaultValue | default value |
Definition at line 78 of file IniFile.cpp.
| bool kome::core::IniFile::load | ( | const char * | path | ) |
load the ini file
| [in] | path | ini file path |
Definition at line 384 of file IniFile.cpp.

|
static |
loads ini file and gets IniFile object.
| [in] | path | ini file path |
Definition at line 555 of file IniFile.cpp.

| bool kome::core::IniFile::save | ( | const char * | path = NULL | ) |
save the ini file
| [in] | path | ini file path. (If path is NULL, it is saved to the same place as the loaded file.) |
Definition at line 486 of file IniFile.cpp.

| void kome::core::IniFile::setBool | ( | const char * | section, |
| const char * | key, | ||
| const bool | value | ||
| ) |
sets boolean value
| [in] | section | parameter section |
| [in] | key | parameter key |
| [in] | value | parameter value |
Definition at line 207 of file IniFile.cpp.
| void kome::core::IniFile::setDouble | ( | const char * | section, |
| const char * | key, | ||
| const double | value | ||
| ) |
sets real number value
| [in] | section | parameter section |
| [in] | key | parameter key |
| [in] | value | parameter value |
Definition at line 263 of file IniFile.cpp.
| void kome::core::IniFile::setInt | ( | const char * | section, |
| const char * | key, | ||
| const int | value | ||
| ) |
sets integer number value
| [in] | section | parameter section |
| [in] | key | parameter key |
| [in] | value | parameter value |
Definition at line 235 of file IniFile.cpp.
| void kome::core::IniFile::setString | ( | const char * | section, |
| const char * | key, | ||
| const char * | value | ||
| ) |
sets string value
| [in] | section | parameter section |
| [in] | key | parameter key |
| [in] | value | parameter value |
Definition at line 64 of file IniFile.cpp.
|
protected |
|
protected |
section Properties map (section -> Properties)
|
protected |
1.8.6