Adbase
Adinf C++ base library V2
|
#include <IniConfig.hpp>
Public Member Functions | |
bool | hasSection (const std::string §ionName) const |
检查一个配置节是否存在 More... | |
bool | hasOption (const std::string §ionName, const std::string &optionName) const |
检查一个配置项是否存在 More... | |
std::string | getOption (const std::string §ionName, const std::string &optionName) const |
获取一个配置项 More... | |
uint32_t | getOptionUint32 (const std::string §ionName, const std::string &optionName) |
获取一个配置项 More... | |
uint64_t | getOptionUint64 (const std::string §ionName, const std::string &optionName) |
获取一个配置项 More... | |
bool | getOptionBool (const std::string §ionName, const std::string &optionName) |
获取一个配置项 More... | |
std::vector< std::string > | sections () const |
获取所有的节名称 More... | |
std::vector< std::string > | options (const std::string §ionName) const |
获取某个节的配置项 More... | |
void | setOption (const std::string §ionName, const std::string &optionName, const std::string &optionValue) |
设置某个节的配置项 More... | |
void | removeSection (const std::string §ionName) |
删除某个节的配置 More... | |
void | removeOption (const std::string §ionName, const std::string &optionName) |
删除某个节的配置项 More... | |
void | addSection (const std::string §ionName) |
添加配置节点 More... | |
void | addOption (const std::string §ionName, const std::string &optionName, const std::string &optionValue) |
添加配置项 More... | |
virtual | ~IniConfig () |
析构函数 More... | |
Definition at line 20 of file IniConfig.hpp.
|
inlinevirtual |
析构函数
Definition at line 62 of file IniConfig.hpp.
void adbase::IniConfig::addOption | ( | const std::string & | sectionName, |
const std::string & | optionName, | ||
const std::string & | optionValue | ||
) |
添加配置项
Definition at line 152 of file IniConfig.cpp.
References hasOption(), hasSection(), and options().
Referenced by adbase::IniParse::load().
void adbase::IniConfig::addSection | ( | const std::string & | sectionName | ) |
添加配置节点
Definition at line 139 of file IniConfig.cpp.
References hasSection().
Referenced by adbase::IniParse::load().
std::string adbase::IniConfig::getOption | ( | const std::string & | sectionName, |
const std::string & | optionName | ||
) | const |
获取一个配置项
Definition at line 32 of file IniConfig.cpp.
Referenced by getOptionBool(), getOptionUint32(), getOptionUint64(), and adbase::IniParse::write().
bool adbase::IniConfig::getOptionBool | ( | const std::string & | sectionName, |
const std::string & | optionName | ||
) |
uint32_t adbase::IniConfig::getOptionUint32 | ( | const std::string & | sectionName, |
const std::string & | optionName | ||
) |
uint64_t adbase::IniConfig::getOptionUint64 | ( | const std::string & | sectionName, |
const std::string & | optionName | ||
) |
bool adbase::IniConfig::hasOption | ( | const std::string & | sectionName, |
const std::string & | optionName | ||
) | const |
检查一个配置项是否存在
Definition at line 17 of file IniConfig.cpp.
References hasSection(), and options().
Referenced by addOption().
bool adbase::IniConfig::hasSection | ( | const std::string & | sectionName | ) | const |
检查一个配置节是否存在
Definition at line 6 of file IniConfig.cpp.
Referenced by addOption(), addSection(), and hasOption().
std::vector< std::string > adbase::IniConfig::options | ( | const std::string & | sectionName | ) | const |
获取某个节的配置项
Definition at line 95 of file IniConfig.cpp.
Referenced by addOption(), hasOption(), setOption(), and adbase::IniParse::write().
void adbase::IniConfig::removeOption | ( | const std::string & | sectionName, |
const std::string & | optionName | ||
) |
删除某个节的配置项
Definition at line 130 of file IniConfig.cpp.
void adbase::IniConfig::removeSection | ( | const std::string & | sectionName | ) |
删除某个节的配置
Definition at line 121 of file IniConfig.cpp.
std::vector< std::string > adbase::IniConfig::sections | ( | ) | const |
void adbase::IniConfig::setOption | ( | const std::string & | sectionName, |
const std::string & | optionName, | ||
const std::string & | optionValue | ||
) |