本文整理汇总了C++中String::Bool方法的典型用法代码示例。如果您正苦于以下问题:C++ String::Bool方法的具体用法?C++ String::Bool怎么用?C++ String::Bool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类String
的用法示例。
在下文中一共展示了String::Bool方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: return
bool Get_Bool (int fld) { String data; Get_Field (fld, data); return (data.Bool ()); }
示例2: Program_Control
//.........这里部分代码省略.........
fld_ptr->Units (time_units);
}
num = activity_file.Optional_Field ("TIME_MIN", "DURATION");
if (num >= 0) {
fld_ptr = activity_file.Field (num);
fld_ptr->Units (time_units);
}
num = activity_file.Optional_Field ("TIME_MAX", "DURATION");
if (num >= 0) {
fld_ptr = activity_file.Field (num);
fld_ptr->Units (time_units);
}
}
}
//---- plan file ----
if (Check_Control_Key (VERSION4_PLAN_FILE)) {
if (System_File_Flag (PLAN)) {
Error ("A plan file and Version 4 plan file must be processed separateley");
}
if (!System_File_Flag (NEW_PLAN)) {
Error ("A new plan file is required to convert a Version 4 plan file");
}
Print (1);
plan_flag = true;
old_plan.File_Type ("Version4 Plan File");
//---- get the list type ----
key = Get_Control_String (NODE_LIST_PATHS);
if (!key.empty ()) {
type_flag = key.Bool ();
} else {
type_flag = true;
}
old_plan.Node_Based_Flag (type_flag);
//---- get the traveler scale ----
key = Get_Control_String (TRAVELER_SCALING_FACTOR);
if (!key.empty ()) {
scale = key.Integer ();
if (scale < 2 || scale > 100) {
Control_Key_Error (TRAVELER_SCALING_FACTOR, "(2..100)");
}
old_plan.Traveler_Scale (scale);
}
//---- get the file format ----
if (Check_Control_Key (VERSION4_PLAN_FORMAT)) {
old_plan.File_Format (Get_Control_String (VERSION4_PLAN_FORMAT));
}
//---- open the file and print the parameters ----
if (!old_plan.Open (Project_Filename (Get_Control_String (VERSION4_PLAN_FILE)))) {
File_Error ("Opening Version4 Plan File", old_plan.Filename ());
}
Get_Control_Text (VERSION4_PLAN_FORMAT);
type_flag = old_plan.Node_Based_Flag ();