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

feature_generator.hpp « generator - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 411b0b0a66ad9d5f77534b4d3290db34d8aa352e (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
37
#pragma once

#include "../geometry/rect2d.hpp"

#include "../coding/file_writer.hpp"

#include "../std/vector.hpp"
#include "../std/string.hpp"


class FeatureBuilder1;

namespace feature
{
  struct GenerateInfo;

  bool GenerateFeatures(GenerateInfo & info, bool lightNodes);

  // Writes features to dat file.
  class FeaturesCollector
  {
  protected:
    FileWriter m_datFile;

    m2::RectD m_bounds;

  protected:
    static uint32_t GetFileSize(FileWriter const & f);

    void WriteFeatureBase(vector<char> const & bytes, FeatureBuilder1 const & fb);

  public:
    FeaturesCollector(string const & fName);

    void operator() (FeatureBuilder1 const & f);
  };
}