Horizon
src
common
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
#include <vector>
8
#include <map>
9
#include <fstream>
10
11
namespace
horizon {
12
using
json
=
nlohmann::json
;
13
20
class
Arc
{
21
public
:
22
Arc
(
const
UUID
&uu,
const
json
&j,
class
ObjectProvider
&obj);
23
Arc
(
UUID
uu);
24
void
reverse();
25
26
UUID
uuid;
27
uuid_ptr<Junction>
to;
28
uuid_ptr<Junction>
from;
29
uuid_ptr<Junction>
center;
30
uint64_t
width = 0;
31
int
layer = 0;
32
json
serialize()
const
;
33
};
34
}
// namespace horizon
horizon::uuid_ptr
Definition:
uuid_ptr.hpp:9
nlohmann::json
basic_json<> json
default JSON class
Definition:
json_fwd.hpp:61
libzip::uint64_t
zip_uint64_t uint64_t
zip_uint64_t_t typedef.
Definition:
zip.hpp:108
horizon::Arc
Graphical arc.
Definition:
arc.hpp:20
nlohmann::basic_json
a class to store JSON values
Definition:
json.hpp:161
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition:
uuid.hpp:16
horizon::ObjectProvider
Interface for classes that store objects identified by UUID (e.g. Line or Junction)
Definition:
object_provider.hpp:10
Generated by
1.8.16