Horizon
snap_filter.hpp
1 #pragma once
2 #include "common/common.hpp"
3 #include "util/uuid_path.hpp"
4 
5 namespace horizon {
6 class SnapFilter {
7 public:
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