本文整理汇总了C++中OrderedTask::CheckTask方法的典型用法代码示例。如果您正苦于以下问题:C++ OrderedTask::CheckTask方法的具体用法?C++ OrderedTask::CheckTask怎么用?C++ OrderedTask::CheckTask使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OrderedTask
的用法示例。
在下文中一共展示了OrderedTask::CheckTask方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadTask
static OrderedTask *
LoadTask2(const TCHAR *path, const TaskBehaviour &task_behaviour)
{
OrderedTask *task = LoadTask(path, task_behaviour);
if (task == nullptr) {
fprintf(stderr, "Failed to parse XML\n");
return nullptr;
}
task->UpdateGeometry();
if (!task->CheckTask()) {
fprintf(stderr, "Failed to load task from XML\n");
delete task;
return NULL;
}
return task;
}
示例2: des
static OrderedTask *
LoadTask(const TCHAR *path, const TaskBehaviour &task_behaviour)
{
DataNode *node = DataNodeXML::Load(path);
if (node == NULL) {
fprintf(stderr, "Failed to parse XML\n");
return NULL;
}
Deserialiser des(*node);
OrderedTask *task = new OrderedTask(task_behaviour);
des.Deserialise(*task);
delete node;
if (!task->CheckTask()) {
fprintf(stderr, "Failed to load task from XML\n");
delete task;
return NULL;
}
return task;
}
示例3: fi
void
PrintHelper::orderedtask_print(const OrderedTask &task,
const AircraftState &state)
{
abstracttask_print(task, state);
if (!task.CheckTask())
return;
std::ofstream fi("output/results/res-isolines.txt");
for (unsigned i = 0; i < task.TaskSize(); ++i) {
const OrderedTaskPoint &tp = task.GetPoint(i);
fi << "## point " << i << "\n";
if (tp.GetType() == TaskPointType::AAT) {
aatpoint_print(fi, (const AATPoint &)tp, state,
task.GetTaskProjection(), 1);
} else {
orderedtaskpoint_print(fi, tp, state, 1);
}
fi << "\n";
}
std::ofstream f1("output/results/res-task.txt");
f1 << "#### Task points\n";
for (unsigned i = 0; i < task.TaskSize(); ++i) {
f1 << "## point " << i << " ###################\n";
const OrderedTaskPoint &tp = task.GetPoint(i);
if (tp.GetType() == TaskPointType::AAT) {
aatpoint_print(f1, (const AATPoint &)tp, state,
task.GetTaskProjection(), 0);
} else {
orderedtaskpoint_print(f1, tp, state, 0);
}
f1 << "\n";
}
std::ofstream f5("output/results/res-ssample.txt");
f5 << "#### Task sampled points\n";
for (unsigned i =0 ; i < task.TaskSize(); ++i) {
const OrderedTaskPoint &tp = task.GetPoint(i);
f5 << "## point " << i << "\n";
sampledtaskpoint_print_samples(f5, tp, state);
f5 << "\n";
}
std::ofstream f2("output/results/res-max.txt");
f2 << "#### Max task\n";
for (unsigned i = 0; i < task.TaskSize(); ++i) {
const OrderedTaskPoint &tp = task.GetPoint(i);
f2 << tp.GetLocationMax().longitude << " "
<< tp.GetLocationMax().latitude << "\n";
}
std::ofstream f3("output/results/res-min.txt");
f3 << "#### Min task\n";
for (unsigned i = 0; i < task.TaskSize(); ++i) {
const OrderedTaskPoint &tp = task.GetPoint(i);
f3 << tp.GetLocationMin().longitude << " "
<< tp.GetLocationMin().latitude << "\n";
}
std::ofstream f4("output/results/res-rem.txt");
f4 << "#### Remaining task\n";
for (unsigned i = 0; i < task.TaskSize(); ++i) {
const OrderedTaskPoint &tp = task.GetPoint(i);
f4 << tp.GetLocationRemaining().longitude << " "
<< tp.GetLocationRemaining().latitude << "\n";
}
}
示例4: CheckOrderedTask
/**
* Check whether ordered task is valid
*
* @return True if task is valid
*/
gcc_pure
bool CheckOrderedTask() const {
return task_ordered.CheckTask();
}