Revert "Device/Driver/LX: Add small delay after baud rate change"
[xcsoar.git] / test / src / Printing.hpp
blob5aa261d048029797b3eefc3f6a7cd51340f12cdc
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.
23 #ifndef PRINTING_HPP
24 #define PRINTING_HPP
26 #define DO_PRINT
28 #include <iostream>
30 class TaskManager;
31 class AbortTask;
32 class GotoTask;
33 class OrderedTask;
34 class AbstractTask;
35 class TaskPoint;
36 class SampledTaskPoint;
37 class ScoredTaskPoint;
38 class OrderedTaskPoint;
39 class ContestManager;
40 class Trace;
41 class AATPoint;
42 class TaskProjection;
43 struct AircraftState;
44 struct GeoPoint;
45 struct ContestResult;
46 class RoutePlanner;
47 class ReachFan;
48 class FlatTriangleFanTree;
49 class FlatTriangleFan;
50 struct Waypoint;
51 struct AirspaceAltitude;
53 #ifdef FIXED_MATH
54 #include "Math/fixed.hpp"
55 std::ostream& operator<<(std::ostream& os, fixed value);
56 #endif
58 std::ostream &operator<< (std::ostream &f, const Waypoint &wp);
60 class PrintHelper {
61 public:
62 static void taskmanager_print(const TaskManager &task,
63 const AircraftState &location);
64 static void abstracttask_print(const AbstractTask &task,
65 const AircraftState &location);
66 static void aborttask_print(const AbortTask &task,
67 const AircraftState &location);
68 static void gototask_print(const GotoTask &task,
69 const AircraftState &location);
70 static void orderedtask_print(const OrderedTask &task,
71 const AircraftState &location);
72 static void taskpoint_print(std::ostream& f, const TaskPoint& tp, const AircraftState &state);
73 static void sampledtaskpoint_print(std::ostream& f, const SampledTaskPoint& tp,
74 const AircraftState &state);
75 static void sampledtaskpoint_print_samples(std::ostream &f,
76 const ScoredTaskPoint &tp,
77 const AircraftState &state);
78 static void orderedtaskpoint_print(std::ostream& f, const OrderedTaskPoint& tp,
79 const AircraftState &state,
80 const int item=0);
81 static void orderedtaskpoint_print_boundary(std::ostream& f, const OrderedTaskPoint& tp,
82 const AircraftState &state);
83 static void aatpoint_print(std::ostream& f, const AATPoint& tp,
84 const AircraftState &state,
85 const TaskProjection &projection,
86 const int item=0);
87 static void contestmanager_print(const ContestManager& cm,
88 const Trace &trace_full,
89 const Trace &trace_triangle,
90 const Trace &trace_sprint);
91 static void trace_print(const Trace& trace, const GeoPoint &loc);
92 static void print(const ContestResult& result);
93 static void print_route(RoutePlanner& r);
94 static void print_reach_tree(const RoutePlanner& r);
95 static void print(const ReachFan& r);
96 static void print(const FlatTriangleFanTree& r);
97 static void print(const FlatTriangleFan& r, const unsigned depth);
100 #endif