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_provider.hpp"
8 #include "util/uuid_ptr.hpp"
9 #include <fstream>
10 #include <map>
11 #include <vector>
12 
13 namespace horizon {
14 using json = nlohmann::json;
15 
16 class ConnectionLine : public UUIDProvider {
17 public:
18  ConnectionLine(const UUID &uu, const json &j, class Board *brd = nullptr);
19  ConnectionLine(const UUID &uu);
20 
21  void update_refs(class Board &brd);
22  virtual UUID get_uuid() const;
23 
24  UUID uuid;
25 
26  Track::Connection from;
28 
29  json serialize() const;
30 };
31 } // namespace horizon
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61
horizon::Board
Definition: board.hpp:31
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:161
horizon::Track::Connection
Definition: track.hpp:35
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
horizon::ConnectionLine
Definition: connection_line.hpp:16
horizon::UUIDProvider
Interface for objects that have a UUID.
Definition: uuid_provider.hpp:9