-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode.h
58 lines (49 loc) · 1.07 KB
/
node.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*node.h*/
//
// A node / position in the Open Street Map.
//
#pragma once
//
// Node:
//
// A node is a point on the map, with a unique ID and the position
// in GPS (lat, lon) terms. A node may also track other information,
// in particular whether this node denotes the entrance to a
// building.
//
class Node
{
private:
long long ID;
double Lat;
double Lon;
bool IsEntrance;
//
// These are static / class / singleton variables
// so that we can collect some statistics on how
// many times getID( ) is called, how many nodes
// are created, and how many are copied:
//
inline static int CallsToGetID = 0;
inline static int Created = 0;
inline static int Copied = 0;
public:
//
// constructor
//
Node(long long id, double lat, double lon, bool entrance);
//
// copy constructor:
//
Node(const Node& other);
//
// accessors / getters
//
long long getID() const;
double getLat() const;
double getLon() const;
bool getIsEntrance() const;
static int getCallsToGetID();
static int getCreated();
static int getCopied();
};