本文整理汇总了C++中TaskManager::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ TaskManager::Reset方法的具体用法?C++ TaskManager::Reset怎么用?C++ TaskManager::Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TaskManager
的用法示例。
在下文中一共展示了TaskManager::Reset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test_task_manip
//.........这里部分代码省略.........
}
task_report(task_manager, "# removing tp 50 (illegal)\n");
if (fact.Remove(50)) {
return false;
}
OrderedTaskPoint *tp;
const Waypoint *wp;
task_report(task_manager, "# inserting at 3\n");
wp = waypoints.LookupId(3);
if (wp) {
tp = fact.CreateIntermediate(TaskPointFactoryType::AST_CYLINDER,*wp);
if (!fact.Insert(*tp,3)) return false;
delete tp;
}
task_report(task_manager, "# auto-replacing at 2 (no morph)\n");
wp = waypoints.LookupId(9);
if (wp) {
tp = fact.CreateIntermediate(TaskPointFactoryType::AST_CYLINDER,*wp);
if (!fact.Replace(*tp,2)) return false;
delete tp;
}
task_report(task_manager, "# auto-replacing at 2 (morph)\n");
wp = waypoints.LookupId(9);
if (wp) {
tp = fact.CreateStart(*wp);
if (!fact.Replace(*tp,2)) return false;
delete tp;
}
task_report(task_manager, "# auto-replacing at 0 (morph this)\n");
wp = waypoints.LookupId(12);
if (wp) {
tp = fact.CreateIntermediate(TaskPointFactoryType::AST_CYLINDER,*wp);
if (!fact.Replace(*tp,0)) return false;
delete tp;
}
task_report(task_manager, "# auto-replacing at end (morph this)\n");
wp = waypoints.LookupId(14);
if (wp) {
tp = fact.CreateIntermediate(TaskPointFactoryType::AST_CYLINDER,*wp);
if (!fact.Replace(*tp,task_manager.TaskSize()-1)) return false;
delete tp;
}
task_report(task_manager, "# removing finish point\n");
if (!fact.Remove(task_manager.TaskSize()-1)) {
return false;
}
task_report(task_manager, "# inserting at 50 (equivalent to append)\n");
wp = waypoints.LookupId(8);
if (wp) {
tp = fact.CreateFinish(*wp);
if (!fact.Insert(*tp,50)) return false;
delete tp;
}
task_report(task_manager, "# inserting at 0 (morph this)\n");
wp = waypoints.LookupId(3);
if (wp) {
tp = fact.CreateFinish(*wp);
if (!fact.Insert(*tp,0)) return false;
delete tp;
}
task_report(task_manager, "# inserting at 2 (morph this)\n");
wp = waypoints.LookupId(4);
if (wp) {
tp = fact.CreateStart(*wp);
if (!fact.Insert(*tp,2)) return false;
delete tp;
}
task_report(task_manager, "# inserting at 2 (direct)\n");
wp = waypoints.LookupId(6);
if (wp) {
tp = fact.CreateIntermediate(*wp);
if (!fact.Insert(*tp,2,false)) return false;
delete tp;
}
task_report(task_manager, "# checking task\n");
fact.UpdateStatsGeometry();
if (task_manager.CheckOrderedTask()) {
task_manager.Reset();
task_manager.SetActiveTaskPoint(0);
task_manager.Resume();
} else {
return false;
}
return true;
}