herald
2.0.0
Main Page
Namespaces
Namespace List
Namespace Members
All
Functions
Typedefs
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
u
v
~
Functions
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
u
v
~
Variables
Related Functions
Files
File List
•
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
herald
include
herald
datatype
distance.h
1
// Copyright 2021 Herald Project Contributors
2
// SPDX-License-Identifier: Apache-2.0
3
//
4
5
#ifndef HERALD_DISTANCE_H
6
#define HERALD_DISTANCE_H
7
8
#include <cstddef>
9
10
namespace
herald
{
11
namespace
datatype {
12
15
struct
Distance
{
16
double
value;
17
18
Distance
();
// default ctor (evaluates to 0)
19
Distance
(
double
value);
20
Distance
(
const
Distance
& other);
// copy ctor
21
Distance
(
Distance
&& other);
// move ctor
22
~
Distance
();
23
24
Distance
& operator=(
const
Distance
& other);
// copy assign
25
Distance
& operator=(
Distance
&& other);
// move assign
26
27
bool
operator==(
const
double
other)
const
noexcept;
28
bool
operator!=(
const
double
other)
const
noexcept;
29
bool
operator==(
const
Distance
& other)
const
noexcept;
30
bool
operator!=(
const
Distance
& other)
const
noexcept;
31
bool
operator<(
const
Distance
& other)
const
noexcept;
32
bool
operator<=(
const
Distance
& other)
const
noexcept;
33
bool
operator>(
const
Distance
& other)
const
noexcept;
34
bool
operator>=(
const
Distance
& other)
const
noexcept;
35
36
operator
double()
const
noexcept;
37
38
std::size_t hashCode()
const
noexcept;
39
};
40
41
}
42
}
43
44
#endif
herald
Acts as a non-global memory arena for arbitrary classes.
Definition:
aggregates.h:15
herald::datatype::Distance
Definition:
distance.h:15
Generated by
1.9.1