Bridges-C++  3.1.1
Bridges(C++API)
OSMEdge.h
Go to the documentation of this file.
1 #ifndef OSM_EDGE_H
2 
3 #define OSM_EDGE_H
4 
5 #include <string>
6 #include "./data_src/OSMVertex.h"
7 
8 
9 using namespace std;
10 
11 namespace bridges {
12  namespace dataset {
21  class OSMEdge {
22 
23  private:
24  // edge vertices
25  OSMVertex::OSMVertexID src_vertex = 0;
26  OSMVertex::OSMVertexID dest_vertex = 0;
27  // edge length
28  double length = 0.0;
29 
30  public:
31 
33  src_vertex(src), dest_vertex(dest), length(dist) {
34  }
35 
36  OSMEdge(const OSMEdge *edge) : src_vertex(edge->src_vertex),
37  dest_vertex(edge->dest_vertex), length(edge->length) {
38  }
39 
46  return src_vertex;
47  }
54  src_vertex = src;
55  }
62  return dest_vertex;
63  }
70  this->dest_vertex = dest;
71  }
77  double getEdgeLength() const {
78  return length;
79  }
85  void setEdgeLength(double l) {
86  this->length = l;
87  }
88  };
89  }
90 } // namespace bridges
91 
92 #endif
OSMVertex::OSMVertexID getSourceVertex() const
Definition: OSMEdge.h:45
void setDestinationVertex(OSMVertex::OSMVertexID dest)
Definition: OSMEdge.h:69
OSMEdge(const OSMEdge *edge)
Definition: OSMEdge.h:36
STL namespace.
void setEdgeLength(double l)
Definition: OSMEdge.h:85
long OSMVertexID
Definition: OSMVertex.h:30
Class that hold Open Street Map edges.
Definition: OSMEdge.h:21
OSMVertex::OSMVertexID getDestinationVertex() const
Definition: OSMEdge.h:61
these methods convert byte arrays in to base64 codes and are used in BRIDGES to represent the color a...
Definition: alltypes.h:4
OSMEdge(OSMVertex::OSMVertexID src, OSMVertex::OSMVertexID dest, double dist)
Definition: OSMEdge.h:32
void setSourceVertex(OSMVertex::OSMVertexID src)
Definition: OSMEdge.h:53
double getEdgeLength() const
Definition: OSMEdge.h:77