Bridges-C++ 3.5.0-dev2-1-ge3e57bf
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>
7
8using namespace std;
9
10namespace bridges {
11 namespace dataset {
27 class OSMEdge {
28
29 private:
30 // edge vertices
31 OSMVertex::OSMVertexID src_vertex = 0;
32 OSMVertex::OSMVertexID dest_vertex = 0;
33 // edge length
34 double length = 0.0;
35
36 public:
44 double dist) : src_vertex(src), dest_vertex(dest),
45 length(dist) {
46 }
47
52 OSMEdge(const OSMEdge *edge) : src_vertex(edge->src_vertex),
53 dest_vertex(edge->dest_vertex), length(edge->length) {
54 }
55
62 return src_vertex;
63 }
70 src_vertex = src;
71 }
78 return dest_vertex;
79 }
86 this->dest_vertex = dest;
87 }
93 double getEdgeLength() const {
94 return length;
95 }
101 void setEdgeLength(double l) {
102 this->length = l;
103 }
104 };
105 }
106} // namespace bridges
107
108#endif
Class that hold Open Street Map edges.
Definition: OSMEdge.h:27
double getEdgeLength() const
Definition: OSMEdge.h:93
void setEdgeLength(double l)
Definition: OSMEdge.h:101
OSMEdge(OSMVertex::OSMVertexID src, OSMVertex::OSMVertexID dest, double dist)
Definition: OSMEdge.h:43
void setDestinationVertex(OSMVertex::OSMVertexID dest)
Definition: OSMEdge.h:85
OSMEdge(const OSMEdge *edge)
Definition: OSMEdge.h:52
OSMVertex::OSMVertexID getSourceVertex() const
Definition: OSMEdge.h:61
void setSourceVertex(OSMVertex::OSMVertexID src)
Definition: OSMEdge.h:69
OSMVertex::OSMVertexID getDestinationVertex() const
Definition: OSMEdge.h:77
long OSMVertexID
Definition: OSMVertex.h:35
these methods convert byte arrays in to base64 codes and are used in BRIDGES to represent the color a...
Definition: alltypes.h:4