Horizon
Loading...
Searching...
No Matches
snap_filter.hpp
1#pragma once
2#include "common/common.hpp"
3#include "util/uuid_path.hpp"
4
5namespace horizon {
6class SnapFilter {
7public:
8 UUID uu;
9 ObjectType type;
10 int vertex = 0;
11 SnapFilter(ObjectType ot, const UUID &u, int v = -1) : uu(u), type(ot), vertex(v){};
12 bool operator<(const SnapFilter &other) const
13 {
14 if (type < other.type) {
15 return true;
16 }
17 if (type > other.type) {
18 return false;
19 }
20 if (uu < other.uu) {
21 return true;
22 }
23 else if (other.uu < uu) {
24 return false;
25 }
26 return vertex < other.vertex;
27 }
28 bool operator==(const SnapFilter &other) const
29 {
30 return (uu == other.uu) && (vertex == other.vertex) && (type == other.type);
31 }
32};
33} // namespace horizon
Definition snap_filter.hpp:6
This class encapsulates a UUID and allows it to be uses as a value type.
Definition uuid.hpp:16