本文整理汇总了C++中Section_prop::Add_path方法的典型用法代码示例。如果您正苦于以下问题:C++ Section_prop::Add_path方法的具体用法?C++ Section_prop::Add_path怎么用?C++ Section_prop::Add_path使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Section_prop
的用法示例。
在下文中一共展示了Section_prop::Add_path方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FIRMWARE_Init
/*
* Initialize config file settings
*/
void FIRMWARE_Init(void)
{
char **list;
std::string config_path, rc_file;
Section_prop *secprop;
Section_line *secline;
Prop_int *Pint;
Prop_hex *Phex;
Prop_string *Pstring;
Prop_bool *Pbool;
Prop_multival *Pmulti;
Prop_multival_remain *Pmulti_remain;
/* Configuration file directory */
Cross::GetPlatformConfigDir(config_path);
// Create list of supported firmware systems
list = initFirmwareList();
// Setup firmware config file options
secprop=control->AddSection_prop("firmware", &FIRMWARE_Config);
// System type to use
Pstring = secprop->Add_string("system", Property::Changeable::OnlyAtStart, list[0]);
Pstring->Set_values(list);
Pstring->Set_help("Select the firmware to use.");
// System configuration file
rc_file = config_path + "sys.rc";
Pstring = secprop->Add_path("sysrc", Property::Changeable::OnlyAtStart, rc_file.c_str());
Pstring->Set_help("Path to the system configuration file.");
// Boot rc file
rc_file = config_path + "boot.rc";
Pstring = secprop->Add_path("bootrc", Property::Changeable::OnlyAtStart, rc_file.c_str());
Pstring->Set_help("Path to the boot configuration file.");
}