本文整理汇总了C++中CONFIG::GetParam方法的典型用法代码示例。如果您正苦于以下问题:C++ CONFIG::GetParam方法的具体用法?C++ CONFIG::GetParam怎么用?C++ CONFIG::GetParam使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CONFIG
的用法示例。
在下文中一共展示了CONFIG::GetParam方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Param
static void Param(
CONFIG & config,
bool write,
CONFIG::iterator & section,
const std::string & name,
T & value)
{
if (write)
{
config.SetParam(section, name, value);
}
else
{
config.GetParam(section, name, value);
}
}
示例2: RegisterActions
void GUICONTROL::RegisterActions(
const std::map<std::string, Slot1<const std::string &>*> & vactionmap,
const std::map<std::string, Slot0*> & actionmap,
const std::string & name,
const CONFIG & cfg)
{
CONFIG::const_iterator section;
cfg.GetSection(name, section);
std::string actionstr;
if (cfg.GetParam(section, "onselectx", actionstr))
SetActions(vactionmap, actionstr, onselectx);
if (cfg.GetParam(section, "onselecty", actionstr))
SetActions(vactionmap, actionstr, onselecty);
if (cfg.GetParam(section, "onselect", actionstr))
SetActions(actionmap, actionstr, onselect);
if (cfg.GetParam(section, "onfocus", actionstr))
SetActions(actionmap, actionstr, onfocus);
if (cfg.GetParam(section, "onblur", actionstr))
SetActions(actionmap, actionstr, onblur);
if (cfg.GetParam(section, "onmoveup", actionstr))
SetActions(actionmap, actionstr, onmoveup);
if (cfg.GetParam(section, "onmovedown", actionstr))
SetActions(actionmap, actionstr, onmovedown);
if (cfg.GetParam(section, "onmoveleft", actionstr))
SetActions(actionmap, actionstr, onmoveleft);
if (cfg.GetParam(section, "onmoveright", actionstr))
SetActions(actionmap, actionstr, onmoveright);
}