Horizon
src
common
dimension.hpp
1
#pragma once
2
#include "util/uuid.hpp"
3
#include "nlohmann/json_fwd.hpp"
4
#include "common.hpp"
5
#include <vector>
6
#include <map>
7
#include <fstream>
8
9
namespace
horizon {
10
using
json
=
nlohmann::json
;
11
12
class
Dimension
{
13
public
:
14
Dimension
(
const
UUID
&uu,
const
json
&j);
15
Dimension
(
const
UUID
&uu);
16
17
UUID
uuid;
18
Coordi
p0;
19
Coordi
p1;
20
int64_t
label_distance = 3_mm;
21
uint64_t
label_size = 1.5_mm;
22
bool
temp =
false
;
23
24
enum class
Mode { HORIZONTAL, VERTICAL, DISTANCE };
25
Mode mode = Mode::DISTANCE;
26
27
int64_t
project(
const
Coordi
&c)
const
;
28
int64_t
get_length()
const
;
29
30
json
serialize()
const
;
31
};
32
}
// namespace horizon
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::Dimension
Definition:
dimension.hpp:12
horizon::Coord< int64_t >
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
libzip::int64_t
zip_int64_t int64_t
zip_int64_t typedef.
Definition:
zip.hpp:103
Generated by
1.8.16