Horizon
arc.hpp
1 #pragma once
2 #include "util/uuid.hpp"
3 #include "nlohmann/json_fwd.hpp"
4 #include "common.hpp"
5 #include "junction.hpp"
6 #include "util/uuid_ptr.hpp"
7 
8 namespace horizon {
9 using json = nlohmann::json;
10 
17 class Arc {
18 public:
19  Arc(const UUID &uu, const json &j, class ObjectProvider &obj);
20  Arc(UUID uu);
21  void reverse();
22 
23  UUID uuid;
25  uuid_ptr<Junction> from;
26  uuid_ptr<Junction> center;
27  uint64_t width = 0;
28  int layer = 0;
29  json serialize() const;
30 };
31 } // namespace horizon
Graphical arc.
Definition: arc.hpp:17
Interface for classes that store objects identified by UUID (e.g. Line or Junction)
Definition: object_provider.hpp:10
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
Definition: uuid_ptr.hpp:8
a class to store JSON values
Definition: json.hpp:177
basic_json<> json
default JSON class
Definition: json_fwd.hpp:62