Beispiel #1
0
  gcc_pure
  OrderedTaskPoint &GetPoint(const unsigned i) {
    assert(i < task_points.size());
    assert(task_points[i] != nullptr);

    return *task_points[i];
  }
Beispiel #2
0
    gcc_pure
    const OrderedTaskPoint &GetPoint(const unsigned i) const {
        assert(i < task_points.size());
        assert(task_points[i] != NULL);

        return *task_points[i];
    }
Beispiel #3
0
void
OrderedTask::CheckDuplicateWaypoints(Waypoints& waypoints,
                                     OrderedTaskPointVector& points,
                                     const bool is_task)
{
  for (auto begin = points.cbegin(), end = points.cend(), i = begin;
       i != end; ++i) {
    auto wp = waypoints.CheckExistsOrAppend((*i)->GetWaypointPtr());

    const OrderedTaskPoint *new_tp =
      (*i)->Clone(task_behaviour, ordered_settings, std::move(wp));
    if (is_task)
      Replace(*new_tp, std::distance(begin, i));
    else
      ReplaceOptionalStart(*new_tp, std::distance(begin, i));
    delete new_tp;
  }
}
Beispiel #4
0
 /* virtual methods from class TaskInterface */
 virtual unsigned TaskSize() const override {
     return task_points.size();
 }
Beispiel #5
0
    /**
     * returns optional start point
     *
     * @param pos optional start point index
     * @return NULL if index out of range, else optional start point
     */
    gcc_pure
    const OrderedTaskPoint &GetOptionalStartPoint(unsigned i) const {
        assert(i < optional_start_points.size());

        return *optional_start_points[i];
    }
Beispiel #6
0
 /**
  * @return number of optional start poitns
  */
 gcc_pure
 unsigned GetOptionalStartPointCount() const {
     return optional_start_points.size();
 }
Beispiel #7
0
 /**
  * Check whether the task point with the specified index exists.
  */
 gcc_pure
 bool IsValidIndex(unsigned i) const {
     return i < task_points.size();
 }
Beispiel #8
0
 /**
  * Returns true if there are optional start points.
  */
 gcc_pure
 bool HasOptionalStarts() const {
     return !optional_start_points.empty();
 }
Beispiel #9
0
    /**
     * Retrieve task point by sequence index
     *
     * @param index Index of task point sequence
     *
     * @return OrderedTaskPoint at index
     */
    gcc_pure
    const OrderedTaskPoint &GetTaskPoint(const unsigned index) const {
        assert(index < task_points.size());

        return *task_points[index];
    }
 /**
  * @return number of optional start poitns
  */
 gcc_pure
 unsigned optional_start_points_size() { return optional_start_points.size(); }