本文整理汇总了C++中ConfigReader::getStringValue方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigReader::getStringValue方法的具体用法?C++ ConfigReader::getStringValue怎么用?C++ ConfigReader::getStringValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigReader
的用法示例。
在下文中一共展示了ConfigReader::getStringValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
void main()
{
// ============= Direct test of logger
Logger *logger = new StdoutLogger();
logger->SetLogLevel(Logger::LOGLEVEL_INFO);
logger->Log(Logger::LOGLEVEL_INFO,"DirectTest","DirectTest message on info level.\n",1);
logger->SetLogLevel(Logger::LOGLEVEL_VERBOSE);
logger->Log(Logger::LOGLEVEL_INFO,"DirectTest","Not appearing DirectTest message on info level.\n",1);
Logger::getInstance()->Log(Logger::LOGLEVEL_VERBOSE,"SingletonTest","Appearing singleton test...\n");
int i=12;
FileLogger loggerF("d:\\e3.txt");
Logger::getInstance()->Log(Logger::LOGLEVEL_ERROR,"TAG","Szam:%d %d %s %d\n",1,2,"Hello",3);
loggerF.close();
// ============ Direct test of ConfigReader
SimpleIniConfigReader *SIreader = new SimpleIniConfigReader("test.ini");
ConfigReader *reader = SIreader;
bool boolean1 = reader->getBoolValue("main","boolean1");
bool boolean2 = reader->getBoolValue("main","boolean2");
bool boolean3 = reader->getBoolValue("main","boolean3");
const char *str = reader->getStringValue("main","string");
int integer1 = ConfigReader::getInstance()->getIntValue("main","integer");
std::cout << "Bools: " << boolean1 << ", " << boolean2 << ", " << boolean3 << std::endl;
std::cout << "Integer: " << integer1 << std::endl;
std::cout << "String: " << str << std::endl;
}