forked from organicmaps/organicmaps-tmp
[generator] struct City, Region* -> class.
This commit is contained in:
parent
0d3fadf98f
commit
ee08a982e0
4 changed files with 9 additions and 6 deletions
|
@ -10,8 +10,9 @@ namespace generator
|
|||
{
|
||||
namespace regions
|
||||
{
|
||||
struct City : public RegionWithName, public RegionWithData
|
||||
class City : public RegionWithName, public RegionWithData
|
||||
{
|
||||
public:
|
||||
explicit City(FeatureBuilder1 const & fb, RegionDataProxy const & rd)
|
||||
: RegionWithName(fb.GetParams().name),
|
||||
RegionWithData(rd)
|
||||
|
|
|
@ -121,7 +121,6 @@ private:
|
|||
MapIsoCode m_mapIsoCode;
|
||||
};
|
||||
|
||||
|
||||
inline std::ostream & operator<<(std::ostream & out, AdminLevel const & t)
|
||||
{
|
||||
out << static_cast<int>(t);
|
||||
|
|
|
@ -13,12 +13,13 @@ class RegionDataProxy;
|
|||
|
||||
namespace regions
|
||||
{
|
||||
struct City;
|
||||
class City;
|
||||
|
||||
// This is a helper class that is needed to represent the region.
|
||||
// With this view, further processing is simplified.
|
||||
struct Region : public RegionWithName, public RegionWithData
|
||||
class Region : public RegionWithName, public RegionWithData
|
||||
{
|
||||
public:
|
||||
explicit Region(FeatureBuilder1 const & fb, RegionDataProxy const & rd);
|
||||
// Build a region and its boundary based on the heuristic.
|
||||
explicit Region(City const & city);
|
||||
|
|
|
@ -23,8 +23,9 @@ using BoostPoint = boost::geometry::model::point<double, 2, boost::geometry::cs:
|
|||
using BoostPolygon = boost::geometry::model::polygon<BoostPoint>;
|
||||
using BoostRect = boost::geometry::model::box<BoostPoint>;
|
||||
|
||||
struct RegionWithName
|
||||
class RegionWithName
|
||||
{
|
||||
public:
|
||||
RegionWithName(StringUtf8Multilang const & name) : m_name(name) {}
|
||||
|
||||
// This function will take the following steps:
|
||||
|
@ -40,8 +41,9 @@ protected:
|
|||
StringUtf8Multilang m_name;
|
||||
};
|
||||
|
||||
struct RegionWithData
|
||||
class RegionWithData
|
||||
{
|
||||
public:
|
||||
static uint8_t constexpr kNoRank = 0;
|
||||
|
||||
RegionWithData(RegionDataProxy const & regionData) : m_regionData(regionData) {}
|
||||
|
|
Loading…
Add table
Reference in a new issue