src
tile_id.h
Go to the documentation of this file.
1
/* Copyright 2018-2019 TomTom N.V.
2
3
Licensed under the Apache License, Version 2.0 (the "License");
4
you may not use this file except in compliance with the License.
5
You may obtain a copy of the License at
6
7
http://www.apache.org/licenses/LICENSE-2.0
8
9
Unless required by applicable law or agreed to in writing, software
10
distributed under the License is distributed on an "AS IS" BASIS,
11
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
See the License for the specific language governing permissions and
13
limitations under the License. */
14
15
#pragma once
16
17
#include <cstddef>
18
#include <functional>
19
#include <string>
20
#include <tuple>
21
22
#include <QMetaType>
23
24
#include "
coordinates.h
"
25
31
struct
TileId
32
{
33
std::string
tile_server
;
34
TileCoordinate
coord
;
35
int
zoom
;
36
};
37
38
namespace
std
39
{
40
template
<>
41
struct
hash<
TileId
>
42
{
43
public
:
44
size_t
operator()(
TileId
const
& tile_id)
const
;
45
};
46
}
// namespace std
47
48
inline
bool
operator==
(
TileId
const
&
self
,
TileId
const
& other)
49
{
50
// optimization: check the tile_server last
51
return
std::tie(
self
.coord,
self
.zoom,
self
.tile_server) == std::tie(other.
coord
, other.
zoom
, other.
tile_server
);
52
}
53
54
// Make type available for QVariant
55
Q_DECLARE_METATYPE
(
TileId
)
56
57
60
std::string
tileURL
(
TileId
const
& tile_id);
coordinates.h
tileURL
std::string tileURL(TileId const &tile_id)
Definition:
tile_id.cpp:35
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(ros::Time)
TileId::zoom
int zoom
Definition:
tile_id.h:35
TileId::tile_server
std::string tile_server
Definition:
tile_id.h:33
TileId
Definition:
tile_id.h:31
TileCoordinateGeneric< int >
std
operator==
bool operator==(TileId const &self, TileId const &other)
Definition:
tile_id.h:48
TileId::coord
TileCoordinate coord
Definition:
tile_id.h:34
rviz_satellite
Author(s): Gareth Cross
, Andre Schröder
autogenerated on Thu May 4 2023 02:47:22