1#ifndef OSMSCOUT_UTIL_MAGNIFICATION_H
2#define OSMSCOUT_UTIL_MAGNIFICATION_H
28#include <unordered_map>
80 return level==other.level;
85 return level!=other.level;
90 return level<other.level;
95 return level<=other.level;
100 return level>=other.level;
105 return level>other.level;
110 const MagnificationLevel& level)
118 const MagnificationLevel& level)
120 return std::string(text)+std::to_string(level.Get());
124 const MagnificationLevel& level)
126 return text+std::to_string(level.Get());
134 size_t operator()(
const osmscout::MagnificationLevel& level)
const
136 return hash<uint32_t>{}(level.Get());
164 double magnification=1;
194 return magnification;
204 return magnification==other.magnification;
209 return magnification!=other.magnification;
214 return magnification<other.magnification;
219 return magnification<=other.magnification;
224 return magnification>=other.magnification;
229 return magnification>other.magnification;
252 std::unordered_map<std::string,MagnificationLevel> stringToMagMap;
253 std::unordered_map<MagnificationLevel,std::string> levelToStringMap;
259 Magnification& magnification);
#define OSMSCOUT_API
Definition CoreImportExport.h:45
static MagnificationLevel magCloser
Definition Magnification.h:157
static MagnificationLevel magContinent
Definition Magnification.h:146
bool operator<(const Magnification &other) const
Definition Magnification.h:212
MagnificationLevel & operator=(const MagnificationLevel &other)=default
bool operator>(const Magnification &other) const
Definition Magnification.h:227
static MagnificationLevel magSuburb
Definition Magnification.h:154
static MagnificationLevel magState
Definition Magnification.h:147
static MagnificationLevel magCity
Definition Magnification.h:153
bool operator>=(const Magnification &other) const
Definition Magnification.h:222
uint32_t Get() const
Definition Magnification.h:50
bool operator>=(const MagnificationLevel &other) const
Definition Magnification.h:98
static MagnificationLevel magVeryClose
Definition Magnification.h:158
bool operator<=(const MagnificationLevel &other) const
Definition Magnification.h:93
bool operator!=(const MagnificationLevel &other) const
Definition Magnification.h:83
Magnification(double magnification) noexcept
Definition Magnification.h:174
void SetLevel(const MagnificationLevel &level)
static MagnificationLevel magDetail
Definition Magnification.h:155
bool operator>(const MagnificationLevel &other) const
Definition Magnification.h:103
static MagnificationLevel magBlock
Definition Magnification.h:159
bool operator<(const MagnificationLevel &other) const
Definition Magnification.h:88
static MagnificationLevel magClose
Definition Magnification.h:156
MagnificationLevel & operator++()
Definition Magnification.h:57
uint32_t GetLevel() const
Definition Magnification.h:197
MagnificationLevel & operator+=(uint32_t increment)
Definition Magnification.h:71
static MagnificationLevel magHouse
Definition Magnification.h:161
bool operator==(const MagnificationLevel &other) const
Definition Magnification.h:78
double GetMagnification() const
Definition Magnification.h:192
static MagnificationLevel magRegion
Definition Magnification.h:150
bool operator==(const Magnification &other) const
Definition Magnification.h:202
bool operator!=(const Magnification &other) const
Definition Magnification.h:207
static MagnificationLevel magProximity
Definition Magnification.h:151
Magnification(const MagnificationLevel &level) noexcept
Definition Magnification.h:179
static MagnificationLevel magWorld
Definition Magnification.h:145
void SetMagnification(double magnification)
static MagnificationLevel magCounty
Definition Magnification.h:149
MagnificationLevel()=default
Magnification operator++(int)
Definition Magnification.h:240
static MagnificationLevel magStateOver
Definition Magnification.h:148
Magnification & operator++()
Definition Magnification.h:232
bool operator<=(const Magnification &other) const
Definition Magnification.h:217
static MagnificationLevel magStreet
Definition Magnification.h:160
MagnificationLevel(uint32_t level) noexcept
Definition Magnification.h:43
static MagnificationLevel magCityOver
Definition Magnification.h:152
MagnificationLevel(const MagnificationLevel &level)=default
MagnificationLevel operator++(int)
Definition Magnification.h:64
bool Convert(const std::string &name, Magnification &magnification)
bool Convert(const MagnificationLevel &level, std::string &name)
std::ostream & operator<<(std::ostream &stream, const DBId &o)
Definition DBFileOffset.h:80
OSMSCOUT_API Vertex2D operator+(const Vertex2D &a, const Vertex2D &b)
size_t operator()(const osmscout::MagnificationLevel &level) const
Definition Magnification.h:134