Esempio n. 1
0
 void Finish()
 {
   m_places.ForEach([this] (Place const & p)
   {
     m_emitter(p.GetFeature());
   });
 }
Esempio n. 2
0
  void EmitFeatureBase(FeatureBuilder1 & ft, FeatureParams const & params)
  {
    ft.SetParams(params);
    if (ft.PreSerialize())
    {
      string addr;
      if (m_addrWriter && ftypes::IsBuildingChecker::Instance()(params.m_Types) && ft.FormatFullAddress(addr))
        m_addrWriter->Write(addr.c_str(), addr.size());

      static uint32_t const placeType = classif().GetTypeByPath({"place"});
      uint32_t const type = params.FindType(placeType, 1);

      if (type != ftype::GetEmptyValue() && !ft.GetName().empty())
      {
        m_places.ReplaceEqualInRect(Place(ft, type),
            [](Place const & p1, Place const & p2) { return p1.IsEqual(p2); },
            [](Place const & p1, Place const & p2) { return p1.IsBetterThan(p2); });
      }
      else
        m_emitter(ft);
    }
  }
Esempio n. 3
0
 void forEach(Fn fn)
 {
   m_tree.ForEach(fn);
 }