Horizon
connection_line.hpp
1 #pragma once
2 #include "track.hpp"
3 #include "common/common.hpp"
4 #include "common/junction.hpp"
5 #include "nlohmann/json_fwd.hpp"
6 #include "util/uuid.hpp"
7 #include "util/uuid_ptr.hpp"
8 #include <fstream>
9 #include <map>
10 #include <vector>
11 
12 namespace horizon {
13 using json = nlohmann::json;
14 
15 class ConnectionLine {
16 public:
17  ConnectionLine(const UUID &uu, const json &j, class Board *brd = nullptr);
18  ConnectionLine(const UUID &uu);
19 
20  void update_refs(class Board &brd);
21  UUID get_uuid() const;
22 
23  UUID uuid;
24 
25  Track::Connection from;
26  Track::Connection to;
27 
28  json serialize() const;
29 };
30 } // namespace horizon
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:166
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61