-
Notifications
You must be signed in to change notification settings - Fork 1
/
debuglogger.h
39 lines (29 loc) · 943 Bytes
/
debuglogger.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef PATHFINDER_DEBUGLOGGER_H_
#define PATHFINDER_DEBUGLOGGER_H_
#include "vector.h"
#include <functional>
#include <optional>
#include <string>
namespace pathfinder {
struct Apex;
class Funnel;
class DebugLogger {
public:
static DebugLogger& instance();
void setPointToIndexFunction(const std::function<std::optional<uint32_t>(const Vector &point)> &func);
void printFunnel(const Funnel &funnel) const;
std::string pointToString(const Vector &point) const;
void setStartPoint(const Vector &point);
void setGoalPoint(const Vector &point);
void resetStartPoint();
void resetGoalPoint();
private:
bool initialized_{false};
std::optional<Vector> startPoint_;
std::optional<Vector> goalPoint_;
std::function<std::optional<uint32_t>(const Vector &point)> pointToIndexFunction_;
DebugLogger();
std::string apexToString(const Apex &apex) const;
};
} // namespace pathfinder
#endif // PATHFINDER_DEBUGLOGGER_H_