Renderer, ...: use PixelRect::GetCenter()
[xcsoar.git] / src / Engine / Task / Unordered / UnorderedTask.hpp
blobe4ea096c793071ec3f06a8958b5a4bcfb3c89321
1 /* Copyright_License {
3 XCSoar Glide Computer - http://www.xcsoar.org/
4 Copyright (C) 2000-2013 The XCSoar Project
5 A detailed list of copyright holders can be found in the file "AUTHORS".
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 #ifndef UNORDEREDTASK_H
23 #define UNORDEREDTASK_H
25 #include "Task/AbstractTask.hpp"
27 /**
28 * Common class for all unordered task types
30 class UnorderedTask:
31 public AbstractTask
33 public:
34 /**
35 * Base constructor.
37 * @param tb Global task behaviour settings
40 UnorderedTask(TaskType _type,
41 const TaskBehaviour &tb);
43 public:
44 /* virtual methods from class AbstractTask */
45 virtual bool CheckTask() const override;
46 virtual bool CheckTransitions(const AircraftState &state_now,
47 const AircraftState &state_last) override;
48 virtual bool CalcBestMC(const AircraftState &state_now,
49 const GlidePolar &glide_polar,
50 fixed& best) const override;
51 virtual fixed CalcRequiredGlide(const AircraftState &state_now,
52 const GlidePolar &glide_polar) const override;
53 virtual fixed CalcGradient(const AircraftState &state_now) const override;
54 virtual fixed ScanTotalStartTime(const AircraftState &state_now) override;
55 virtual fixed ScanLegStartTime(const AircraftState &state_now) override;
56 virtual fixed ScanDistanceNominal() override;
57 virtual fixed ScanDistancePlanned() override;
58 virtual fixed ScanDistanceRemaining(const GeoPoint &ref) override;
59 virtual fixed ScanDistanceScored(const GeoPoint &ref) override;
60 virtual fixed ScanDistanceTravelled(const GeoPoint &ref) override;
61 virtual void ScanDistanceMinMax(const GeoPoint &ref, bool full,
62 fixed *dmin, fixed *dmax) override;
63 virtual void GlideSolutionRemaining(const AircraftState &state_now,
64 const GlidePolar &polar,
65 GlideResult &total, GlideResult &leg) override;
66 virtual void GlideSolutionTravelled(const AircraftState &state_now,
67 const GlidePolar &glide_polar,
68 GlideResult &total, GlideResult &leg) override;
69 virtual void GlideSolutionPlanned(const AircraftState &state_now,
70 const GlidePolar &glide_polar,
71 GlideResult &total,
72 GlideResult &leg,
73 DistanceStat &total_remaining_effective,
74 DistanceStat &leg_remaining_effective,
75 const GlideResult &solution_remaining_total,
76 const GlideResult &solution_remaining_leg) override;
77 virtual bool IsScored() const override { return false; }
80 #endif