blob: 5123d844358785d1c862482ee7bdaece852faf13 (
plain)
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
|
#include "tilespec.h"
TileSpec::TileSpec()
: zoom_(-1),
x_(-1),
y_(-1) {}
TileSpec::TileSpec(int zoom, int x, int y)
: zoom_(zoom),
x_(x),
y_(y) {}
void TileSpec::setZoom(int zoom)
{
zoom_ = zoom;
}
int TileSpec::zoom() const
{
return zoom_;
}
void TileSpec::setX(int x)
{
x_ = x;
}
int TileSpec::x() const
{
return x_;
}
void TileSpec::setY(int y)
{
y_ = y;
}
int TileSpec::y() const
{
return y_;
}
bool TileSpec::operator < (const TileSpec &rhs) const
{
if (zoom_ < rhs.zoom_)
return true;
if (zoom_ > rhs.zoom_)
return false;
if (x_ < rhs.x_)
return true;
if (x_ > rhs.x_)
return false;
return (y_ < rhs.y_);
}
|