本文整理汇总了C++中TaskManager::GetActiveTask方法的典型用法代码示例。如果您正苦于以下问题:C++ TaskManager::GetActiveTask方法的具体用法?C++ TaskManager::GetActiveTask怎么用?C++ TaskManager::GetActiveTask使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TaskManager
的用法示例。
在下文中一共展示了TaskManager::GetActiveTask方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Set
void
ChartProjection::Set(const PixelRect &rc, const TaskManager &task_manager,
const GeoPoint &fallback_loc)
{
const AbstractTask *task = task_manager.GetActiveTask();
if (task != NULL)
Set(rc, *task, fallback_loc);
else
Set(rc, fallback_loc, fixed_zero);
}
示例2: switch
void
PrintHelper::taskmanager_print(const TaskManager &task,
const AircraftState &state)
{
switch (task.GetMode()) {
case TaskType::NONE:
break;
case TaskType::ABORT:
aborttask_print(*(const AbortTask *)task.GetActiveTask(), state);
break;
case TaskType::GOTO:
gototask_print(*(const GotoTask *)task.GetActiveTask(), state);
break;
case TaskType::ORDERED:
orderedtask_print(task.GetOrderedTask(), state);
break;
}
}
示例3: printf
void
task_report(const TaskManager &task_manager, const char *text)
{
AircraftState ac;
if (verbose) {
printf("%s",text);
const AbstractTask *task = task_manager.GetActiveTask();
if (task != NULL) {
switch (task->GetType()) {
case TaskType::NONE:
printf("# task is none\n");
break;
case TaskType::ORDERED:
printf("# task is ordered\n");
task_manager.GetFactory().UpdateGeometry();
break;
case TaskType::ABORT:
printf("# task is abort\n");
break;
case TaskType::GOTO:
printf("# task is goto\n");
break;
}
TaskPointVisitorPrint tpv;
task->AcceptTaskPointVisitor(tpv);
printf("# - dist nominal %g\n",
(double)task->GetStats().distance_nominal);
if (task->GetType() == TaskType::ORDERED &&
task->GetStats().distance_max > task->GetStats().distance_min) {
printf("# - dist max %g\n", (double)task->GetStats().distance_max);
printf("# - dist min %g\n", (double)task->GetStats().distance_min);
}
}
PrintHelper::taskmanager_print(task_manager, ac);
}
if (interactive>1) {
WaitPrompt();
}
}