local m_objConfig=CConfigMgr() ;
local sFileFullName='d:/configmgr_test.ini' ;
local bReturn=m_objConfig:FromFile(sFileFullName);
if bReturn then
print('以文件方式读取成功') ;
else
print('以文件方式读取失败') ;
end
local sInfo=cutil:readFileAsString(sFileFullName) ;
print(sInfo);
local bReturn=m_objConfig:FromString(sInfo);
if bReturn then
print('以字符串方式读取成功');
m_objConfig:Dump();
else
print('以字符串方式读取失败');
end
local sConfigInfo=m_objConfig:vs('port','web');
print(sConfigInfo);
local iConfigInfo=m_objConfig:valueInt('port','web');
print(iConfigInfo);
local sConfigInfo=m_objConfig:valueFloat('port','web');
print(sConfigInfo) ;
local sHelpString=m_objConfig:ToHelpString();
local sHelpString=m_objConfig:ToSegmentHelpString();
print(sHelpString) ;
local sHelpString=m_objConfig:ToSegmentHelpValueString('cache');
print(sHelpString);