Esempio n. 1
0
void 
Serialiser::Serialise(const OrderedTask &task)
{
  node.SetAttribute(_T("type"), GetTaskFactoryType(task.GetFactoryType()));
  Serialise(task.GetOrderedTaskBehaviour());
  mode_optional_start = false;
  task.AcceptTaskPointVisitor(*this);
  mode_optional_start = true;
  task.AcceptStartPointVisitor(*this);
}
Esempio n. 2
0
void 
Serialiser::Serialise(const OrderedTask &task)
{
  node.SetAttribute(_T("type"), GetTaskFactoryType(task.GetFactoryType()));
  Serialise(task.GetOrderedTaskBehaviour());
  mode_optional_start = false;

  for (const auto &tp : task.GetPoints())
    Serialise(tp);

  mode_optional_start = true;
  for (const auto &tp : task.GetOptionalStartPoints())
    Serialise(tp);
}
Esempio n. 3
0
void 
Deserialiser::Deserialise(OrderedTask &task)
{
  task.Clear();
  task.SetFactory(GetTaskFactoryType());
  task.Reset();

  OrderedTaskBehaviour beh = task.GetOrderedTaskBehaviour();
  Deserialise(beh);
  task.SetOrderedTaskBehaviour(beh);

  const DataNode::List children = node.ListChildrenNamed(_T("Point"));
  for (const auto &i : children) {
    std::unique_ptr<DataNode> point_node(i);
    Deserialiser pser(*point_node, waypoints);
    pser.DeserialiseTaskpoint(task);
  }
}
Esempio n. 4
0
 /** 
  * Retrieve (const) the OrderedTaskBehaviour used by the OrderedTask
  * 
  * @return Read-only OrderedTaskBehaviour
  */
 const OrderedTaskBehaviour &GetOrderedTaskBehaviour() const {
   return task_ordered.GetOrderedTaskBehaviour();
 }