Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test_mwm_set.hpp « indexer_tests « indexer - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4835730091c12fb146ddb654cc4df39bd4d3e6b5 (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
#pragma once

#include "indexer/mwm_set.hpp"

#include "platform/country_file.hpp"
#include "platform/local_country_file.hpp"

using platform::CountryFile;
using platform::LocalCountryFile;

namespace tests
{

class TestMwmSet : public MwmSet
{
protected:
  /// @name MwmSet overrides
  //@{
  unique_ptr<MwmInfo> CreateInfo(platform::LocalCountryFile const & localFile) const override
  {
    int const n = localFile.GetCountryName()[0] - '0';
    unique_ptr<MwmInfo> info(new MwmInfo());
    info->m_maxScale = n;
    info->m_limitRect = m2::RectD(0, 0, 1, 1);
    info->m_version.SetFormat(version::Format::lastFormat);
    return info;
  }

  unique_ptr<MwmValueBase> CreateValue(MwmInfo &) const override
  {
    return make_unique<MwmValueBase>();
  }
  //@}
};

}  // namespace