tile_source.h
Go to the documentation of this file.
1 // *****************************************************************************
2 //
3 // Copyright (c) 2015, Southwest Research Institute® (SwRI®)
4 // All rights reserved.
5 //
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are met:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of Southwest Research Institute® (SwRI®) nor the
14 // names of its contributors may be used to endorse or promote products
15 // derived from this software without specific prior written permission.
16 //
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 // ARE DISCLAIMED. IN NO EVENT SHALL Southwest Research Institute® BE LIABLE
21 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
27 // DAMAGE.
28 //
29 // *****************************************************************************
30 
31 #ifndef TILE_MAP_TILE_SOURCE_H
32 #define TILE_MAP_TILE_SOURCE_H
33 
34 #include <QObject>
35 #include <QString>
36 
37 namespace tile_map
38 {
47  class TileSource : public QObject
48  {
49  Q_OBJECT
50  public:
51  virtual ~TileSource() {};
52 
53  virtual const QString& GetBaseUrl() const;
54 
55  virtual void SetBaseUrl(const QString& base_url);
56 
57  virtual bool IsCustom() const;
58 
59  virtual void SetCustom(bool is_custom);
60 
61  virtual int32_t GetMaxZoom() const;
62 
63  virtual void SetMaxZoom(int32_t max_zoom);
64 
65  virtual int32_t GetMinZoom() const;
66 
67  virtual void SetMinZoom(int32_t min_zoom);
68 
69  virtual const QString& GetName() const;
70 
71  virtual void SetName(const QString& name);
72 
81  virtual size_t GenerateTileHash(int32_t level, int64_t x, int64_t y) = 0;
82 
91  virtual QString GenerateTileUrl(int32_t level, int64_t x, int64_t y) = 0;
92 
97  virtual QString GetType() const = 0;
98 
99  Q_SIGNALS:
100  void ErrorMessage(const std::string& error_msg) const;
101  void InfoMessage(const std::string& info_msg) const;
102 
103  protected:
105 
106  QString base_url_;
108  int32_t max_zoom_;
109  int32_t min_zoom_;
110  QString name_;
111  };
112 }
113 
114 #endif //TILE_MAP_TILE_SOURCE_H
string name
virtual void SetMinZoom(int32_t min_zoom)
Definition: tile_source.cpp:70
virtual void SetBaseUrl(const QString &base_url)
Definition: tile_source.cpp:40
TFSIMD_FORCE_INLINE const tfScalar & y() const
virtual void SetMaxZoom(int32_t max_zoom)
Definition: tile_source.cpp:60
void InfoMessage(const std::string &info_msg) const
void ErrorMessage(const std::string &error_msg) const
virtual void SetCustom(bool is_custom)
Definition: tile_source.cpp:50
virtual QString GetType() const =0
TFSIMD_FORCE_INLINE const tfScalar & x() const
virtual const QString & GetBaseUrl() const
Definition: tile_source.cpp:35
virtual size_t GenerateTileHash(int32_t level, int64_t x, int64_t y)=0
virtual void SetName(const QString &name)
Definition: tile_source.cpp:80
virtual bool IsCustom() const
Definition: tile_source.cpp:45
virtual ~TileSource()
Definition: tile_source.h:51
virtual const QString & GetName() const
Definition: tile_source.cpp:75
virtual QString GenerateTileUrl(int32_t level, int64_t x, int64_t y)=0
virtual int32_t GetMaxZoom() const
Definition: tile_source.cpp:55
virtual int32_t GetMinZoom() const
Definition: tile_source.cpp:65


tile_map
Author(s): Marc Alban
autogenerated on Thu Jun 6 2019 19:25:35