[indexer] Move FeatureStatus enum class

This commit is contained in:
Sergey Yershov 2018-06-14 18:44:45 +03:00 committed by mpimenov
parent 2d89cbdd12
commit 8d14bbb537
19 changed files with 257 additions and 152 deletions

View file

@ -503,8 +503,8 @@ void ApplyPointFeature::operator()(m2::PointD const & point, bool hasArea, bool
m_hasArea = hasArea;
m_isUGC = isUGC;
auto const featureStatus = editor.GetFeatureStatus(m_id);
m_createdByEditor = featureStatus == osm::Editor::FeatureStatus::Created;
m_obsoleteInEditor = featureStatus == osm::Editor::FeatureStatus::Obsolete;
m_createdByEditor = featureStatus == datasource::FeatureStatus::Created;
m_obsoleteInEditor = featureStatus == datasource::FeatureStatus::Obsolete;
m_centerPoint = point;
}

View file

@ -346,29 +346,29 @@ void EditorTest::GetFeatureStatusTest()
ForEachCafeAtPoint(m_index, m2::PointD(1.0, 1.0), [&editor](FeatureType & ft)
{
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), osm::Editor::FeatureStatus::Untouched, ());
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), datasource::FeatureStatus::Untouched, ());
osm::EditableMapObject emo;
FillEditableMapObject(editor, ft, emo);
emo.SetBuildingLevels("1");
TEST_EQUAL(editor.SaveEditedFeature(emo), osm::Editor::SaveResult::SavedSuccessfully, ());
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), osm::Editor::FeatureStatus::Modified, ());
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), datasource::FeatureStatus::Modified, ());
editor.MarkFeatureAsObsolete(emo.GetID());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), osm::Editor::FeatureStatus::Obsolete, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), datasource::FeatureStatus::Obsolete, ());
});
ForEachCafeAtPoint(m_index, m2::PointD(2.0, 2.0), [&editor](FeatureType & ft)
{
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), osm::Editor::FeatureStatus::Untouched, ());
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), datasource::FeatureStatus::Untouched, ());
editor.DeleteFeature(ft.GetID());
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), osm::Editor::FeatureStatus::Deleted, ());
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), datasource::FeatureStatus::Deleted, ());
});
osm::EditableMapObject emo;
CreateCafeAtPoint({1.5, 1.5}, mwmId, emo);
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), osm::Editor::FeatureStatus::Created, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), datasource::FeatureStatus::Created, ());
}
void EditorTest::IsFeatureUploadedTest()
@ -420,12 +420,12 @@ void EditorTest::DeleteFeatureTest()
editor.GetEditedFeature(emo.GetID().m_mwmId, emo.GetID().m_index, ft);
editor.DeleteFeature(ft.GetID());
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), osm::Editor::FeatureStatus::Untouched, ());
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), datasource::FeatureStatus::Untouched, ());
ForEachCafeAtPoint(m_index, m2::PointD(1.0, 1.0), [&editor](FeatureType & ft)
{
editor.DeleteFeature(ft.GetID());
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), osm::Editor::FeatureStatus::Deleted, ());
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), datasource::FeatureStatus::Deleted, ());
});
}
@ -455,7 +455,7 @@ void EditorTest::GetFeaturesByStatusTest()
{
MwmSet::MwmId mwmId;
auto const features = editor.GetFeaturesByStatus(mwmId, osm::Editor::FeatureStatus::Untouched);
auto const features = editor.GetFeaturesByStatus(mwmId, datasource::FeatureStatus::Untouched);
TEST(features.empty(), ());
}
@ -500,10 +500,10 @@ void EditorTest::GetFeaturesByStatusTest()
CreateCafeAtPoint({4.0, 4.0}, mwmId, emo);
createdId = emo.GetID();
auto const modified = editor.GetFeaturesByStatus(mwmId, osm::Editor::FeatureStatus::Modified);
auto const deleted = editor.GetFeaturesByStatus(mwmId, osm::Editor::FeatureStatus::Deleted);
auto const obsolete = editor.GetFeaturesByStatus(mwmId, osm::Editor::FeatureStatus::Obsolete);
auto const created = editor.GetFeaturesByStatus(mwmId, osm::Editor::FeatureStatus::Created);
auto const modified = editor.GetFeaturesByStatus(mwmId, datasource::FeatureStatus::Modified);
auto const deleted = editor.GetFeaturesByStatus(mwmId, datasource::FeatureStatus::Deleted);
auto const obsolete = editor.GetFeaturesByStatus(mwmId, datasource::FeatureStatus::Obsolete);
auto const created = editor.GetFeaturesByStatus(mwmId, datasource::FeatureStatus::Created);
TEST_EQUAL(modified.size(), 1, ());
TEST_EQUAL(deleted.size(), 1, ());
@ -811,14 +811,14 @@ void EditorTest::CreateNoteTest()
auto notes = editor.m_notes->GetNotes();
TEST_NOT_EQUAL(notes.front().m_note.find(osm::Editor::kPlaceDoesNotExistMessage), string::npos, ());
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), osm::Editor::FeatureStatus::Obsolete, ());
TEST_EQUAL(editor.GetFeatureStatus(ft.GetID()), datasource::FeatureStatus::Obsolete, ());
});
ForEachCafeAtPoint(m_index, m2::PointD(2.0, 2.0), [&editor, &createAndCheckNote](FeatureType & ft)
{
createAndCheckNote(ft.GetID(), {2.0, 2.0}, osm::Editor::NoteProblemType::General);
TEST_NOT_EQUAL(editor.GetFeatureStatus(ft.GetID()), osm::Editor::FeatureStatus::Obsolete, ());
TEST_NOT_EQUAL(editor.GetFeatureStatus(ft.GetID()), datasource::FeatureStatus::Obsolete, ());
auto notes = editor.m_notes->GetNotes();
TEST_EQUAL(notes.front().m_note.find(osm::Editor::kPlaceDoesNotExistMessage), string::npos, ());
});
@ -978,26 +978,26 @@ void EditorTest::SaveEditedFeatureTest()
editor.CreatePoint(classif().GetTypeByPath({"amenity", "cafe"}), {4.0, 4.0}, mwmId, emo);
emo.SetHouseNumber("12");
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), osm::Editor::FeatureStatus::Untouched, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), datasource::FeatureStatus::Untouched, ());
TEST_EQUAL(editor.SaveEditedFeature(emo), osm::Editor::SaveResult::SavedSuccessfully, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), osm::Editor::FeatureStatus::Created, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), datasource::FeatureStatus::Created, ());
TEST_EQUAL(editor.SaveEditedFeature(emo), osm::Editor::SaveResult::NothingWasChanged, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), osm::Editor::FeatureStatus::Created, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), datasource::FeatureStatus::Created, ());
ForEachCafeAtPoint(m_index, m2::PointD(1.0, 1.0), [&editor](FeatureType & ft)
{
osm::EditableMapObject emo;
FillEditableMapObject(editor, ft, emo);
TEST_EQUAL(editor.SaveEditedFeature(emo), osm::Editor::SaveResult::NothingWasChanged, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), osm::Editor::FeatureStatus::Untouched, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), datasource::FeatureStatus::Untouched, ());
emo.SetHouseNumber("4a");
TEST_EQUAL(editor.SaveEditedFeature(emo), osm::Editor::SaveResult::SavedSuccessfully, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), osm::Editor::FeatureStatus::Modified, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), datasource::FeatureStatus::Modified, ());
TEST_EQUAL(editor.SaveEditedFeature(emo), osm::Editor::SaveResult::NothingWasChanged, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), osm::Editor::FeatureStatus::Modified, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), datasource::FeatureStatus::Modified, ());
emo.SetHouseNumber("");
TEST_EQUAL(editor.SaveEditedFeature(emo), osm::Editor::SaveResult::SavedSuccessfully, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), osm::Editor::FeatureStatus::Untouched, ());
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), datasource::FeatureStatus::Untouched, ());
});
}

View file

@ -16,7 +16,7 @@ namespace editor
{
FeatureID MigrateNodeFeatureIndex(osm::Editor::ForEachFeaturesNearByFn & forEach,
XMLFeature const & xml,
osm::Editor::FeatureStatus const featureStatus,
datasource::FeatureStatus const featureStatus,
TGenerateIDFn const & generateID)
{
unique_ptr<FeatureType> feature;
@ -32,9 +32,9 @@ FeatureID MigrateNodeFeatureIndex(osm::Editor::ForEachFeaturesNearByFn & forEach
},
MercatorBounds::FromLatLon(xml.GetCenter()));
if (!feature && featureStatus != osm::Editor::FeatureStatus::Created)
if (!feature && featureStatus != datasource::FeatureStatus::Created)
MYTHROW(MigrationError, ("No pointed features returned."));
if (featureStatus == osm::Editor::FeatureStatus::Created)
if (featureStatus == datasource::FeatureStatus::Created)
return generateID();
if (count > 1)
@ -47,7 +47,7 @@ FeatureID MigrateNodeFeatureIndex(osm::Editor::ForEachFeaturesNearByFn & forEach
FeatureID MigrateWayOrRelatonFeatureIndex(
osm::Editor::ForEachFeaturesNearByFn & forEach, XMLFeature const & xml,
osm::Editor::FeatureStatus const /* Unused for now (we don't create/delete area features)*/,
datasource::FeatureStatus const /* Unused for now (we don't create/delete area features)*/,
TGenerateIDFn const & /*Unused for the same reason*/)
{
unique_ptr<FeatureType> feature;
@ -104,7 +104,7 @@ FeatureID MigrateWayOrRelatonFeatureIndex(
FeatureID MigrateFeatureIndex(osm::Editor::ForEachFeaturesNearByFn & forEach,
XMLFeature const & xml,
osm::Editor::FeatureStatus const featureStatus,
datasource::FeatureStatus const featureStatus,
TGenerateIDFn const & generateID)
{
switch (xml.GetType())

View file

@ -19,6 +19,6 @@ using TGenerateIDFn = function<FeatureID()>;
/// of a found feature, thows MigrationError if migration fails.
FeatureID MigrateFeatureIndex(osm::Editor::ForEachFeaturesNearByFn & forEach,
XMLFeature const & xml,
osm::Editor::FeatureStatus const featureStatus,
datasource::FeatureStatus const featureStatus,
TGenerateIDFn const & generateID);
} // namespace editor

View file

@ -67,22 +67,22 @@ constexpr char const * kMatchedFeatureIsEmpty = "Matched feature has no tags";
struct XmlSection
{
XmlSection(osm::Editor::FeatureStatus status, std::string const & sectionName)
XmlSection(datasource::FeatureStatus status, std::string const & sectionName)
: m_status(status)
, m_sectionName(sectionName)
{
}
osm::Editor::FeatureStatus m_status = osm::Editor::FeatureStatus::Untouched;
datasource::FeatureStatus m_status = datasource::FeatureStatus::Untouched;
std::string m_sectionName;
};
array<XmlSection, 4> const kXmlSections =
{{
{osm::Editor::FeatureStatus::Deleted, kDeleteSection},
{osm::Editor::FeatureStatus::Modified, kModifySection},
{osm::Editor::FeatureStatus::Obsolete, kObsoleteSection},
{osm::Editor::FeatureStatus::Created, kCreateSection}
{datasource::FeatureStatus::Deleted, kDeleteSection},
{datasource::FeatureStatus::Modified, kModifySection},
{datasource::FeatureStatus::Obsolete, kObsoleteSection},
{datasource::FeatureStatus::Created, kCreateSection}
}};
struct LogHelper
@ -95,15 +95,15 @@ struct LogHelper
m_deleted, "deleted and", m_obsolete, "obsolete features."));
}
void OnStatus(osm::Editor::FeatureStatus status)
void OnStatus(datasource::FeatureStatus status)
{
switch (status)
{
case osm::Editor::FeatureStatus::Deleted: ++m_deleted; break;
case osm::Editor::FeatureStatus::Modified: ++m_modified; break;
case osm::Editor::FeatureStatus::Obsolete: ++m_obsolete; break;
case osm::Editor::FeatureStatus::Created: ++m_created; break;
case osm::Editor::FeatureStatus::Untouched: ASSERT(false, ());
case datasource::FeatureStatus::Deleted: ++m_deleted; break;
case datasource::FeatureStatus::Modified: ++m_modified; break;
case datasource::FeatureStatus::Obsolete: ++m_obsolete; break;
case datasource::FeatureStatus::Created: ++m_created; break;
case datasource::FeatureStatus::Untouched: ASSERT(false, ());
}
}
@ -283,11 +283,11 @@ bool Editor::Save() const
}
switch (fti.m_status)
{
case FeatureStatus::Deleted: VERIFY(xf.AttachToParentNode(deleted), ()); break;
case FeatureStatus::Modified: VERIFY(xf.AttachToParentNode(modified), ()); break;
case FeatureStatus::Created: VERIFY(xf.AttachToParentNode(created), ()); break;
case FeatureStatus::Obsolete: VERIFY(xf.AttachToParentNode(obsolete), ()); break;
case FeatureStatus::Untouched: CHECK(false, ("Not edited features shouldn't be here."));
case datasource::FeatureStatus::Deleted: VERIFY(xf.AttachToParentNode(deleted), ()); break;
case datasource::FeatureStatus::Modified: VERIFY(xf.AttachToParentNode(modified), ()); break;
case datasource::FeatureStatus::Created: VERIFY(xf.AttachToParentNode(created), ()); break;
case datasource::FeatureStatus::Obsolete: VERIFY(xf.AttachToParentNode(obsolete), ()); break;
case datasource::FeatureStatus::Untouched: CHECK(false, ("Not edited features shouldn't be here."));
}
}
}
@ -321,20 +321,20 @@ void Editor::OnMapDeregistered(platform::LocalCountryFile const & localFile)
}
}
Editor::FeatureStatus Editor::GetFeatureStatus(MwmSet::MwmId const & mwmId, uint32_t index) const
datasource::FeatureStatus Editor::GetFeatureStatus(MwmSet::MwmId const & mwmId, uint32_t index) const
{
// Most popular case optimization.
if (m_features.empty())
return FeatureStatus::Untouched;
return datasource::FeatureStatus::Untouched;
auto const * featureInfo = GetFeatureTypeInfo(mwmId, index);
if (featureInfo == nullptr)
return FeatureStatus::Untouched;
return datasource::FeatureStatus::Untouched;
return featureInfo->m_status;
}
Editor::FeatureStatus Editor::GetFeatureStatus(FeatureID const & fid) const
datasource::FeatureStatus Editor::GetFeatureStatus(FeatureID const & fid) const
{
return GetFeatureStatus(fid.m_mwmId, fid.m_index);
}
@ -352,14 +352,14 @@ void Editor::DeleteFeature(FeatureID const & fid)
{
auto const f = mwm->second.find(fid.m_index);
// Created feature is deleted by removing all traces of it.
if (f != mwm->second.end() && f->second.m_status == FeatureStatus::Created)
if (f != mwm->second.end() && f->second.m_status == datasource::FeatureStatus::Created)
{
mwm->second.erase(f);
return;
}
}
MarkFeatureWithStatus(fid, FeatureStatus::Deleted);
MarkFeatureWithStatus(fid, datasource::FeatureStatus::Deleted);
// TODO(AlexZ): Synchronize Save call/make it on a separate thread.
Save();
@ -390,16 +390,16 @@ Editor::SaveResult Editor::SaveEditedFeature(EditableMapObject const & emo)
FeatureTypeInfo fti;
auto const featureStatus = GetFeatureStatus(fid.m_mwmId, fid.m_index);
ASSERT_NOT_EQUAL(featureStatus, FeatureStatus::Obsolete, ("Obsolete feature cannot be modified."));
ASSERT_NOT_EQUAL(featureStatus, FeatureStatus::Deleted, ("Unexpected feature status."));
ASSERT_NOT_EQUAL(featureStatus, datasource::FeatureStatus::Obsolete, ("Obsolete feature cannot be modified."));
ASSERT_NOT_EQUAL(featureStatus, datasource::FeatureStatus::Deleted, ("Unexpected feature status."));
bool const wasCreatedByUser = IsCreatedFeature(fid);
if (wasCreatedByUser)
{
fti.m_status = FeatureStatus::Created;
fti.m_status = datasource::FeatureStatus::Created;
fti.m_feature.ReplaceBy(emo);
if (featureStatus == FeatureStatus::Created)
if (featureStatus == datasource::FeatureStatus::Created)
{
auto const & editedFeatureInfo = m_features[fid.m_mwmId][fid.m_index];
if (AreFeaturesEqualButStreet(fti.m_feature, editedFeatureInfo.m_feature) &&
@ -419,7 +419,7 @@ Editor::SaveResult Editor::SaveEditedFeature(EditableMapObject const & emo)
return SaveResult::SavingError;
}
fti.m_feature = featureStatus == FeatureStatus::Untouched
fti.m_feature = featureStatus == datasource::FeatureStatus::Untouched
? *originalFeaturePtr
: m_features[fid.m_mwmId][fid.m_index].m_feature;
fti.m_feature.ReplaceBy(emo);
@ -427,7 +427,7 @@ Editor::SaveResult Editor::SaveEditedFeature(EditableMapObject const & emo)
AreFeaturesEqualButStreet(fti.m_feature, *originalFeaturePtr) &&
emo.GetStreet().m_defaultName == GetOriginalFeatureStreet(fti.m_feature);
if (featureStatus != FeatureStatus::Untouched)
if (featureStatus != datasource::FeatureStatus::Untouched)
{
// A feature was modified and equals to the one in editor.
auto const & editedFeatureInfo = m_features[fid.m_mwmId][fid.m_index];
@ -459,7 +459,7 @@ Editor::SaveResult Editor::SaveEditedFeature(EditableMapObject const & emo)
return NothingWasChanged;
}
fti.m_status = FeatureStatus::Modified;
fti.m_status = datasource::FeatureStatus::Modified;
}
// TODO: What if local client time is absolutely wrong?
@ -498,7 +498,7 @@ void Editor::ForEachFeatureInMwmRectAndScale(MwmSet::MwmId const & id,
for (auto const & index : mwmFound->second)
{
FeatureTypeInfo const & ftInfo = index.second;
if (ftInfo.m_status == FeatureStatus::Created &&
if (ftInfo.m_status == datasource::FeatureStatus::Created &&
rect.IsPointInside(ftInfo.m_feature.GetCenter()))
f(FeatureID(id, index.first));
}
@ -518,7 +518,7 @@ void Editor::ForEachFeatureInMwmRectAndScale(MwmSet::MwmId const & id,
for (auto & index : mwmFound->second)
{
FeatureTypeInfo & ftInfo = index.second;
if (ftInfo.m_status == FeatureStatus::Created &&
if (ftInfo.m_status == datasource::FeatureStatus::Created &&
rect.IsPointInside(ftInfo.m_feature.GetCenter()))
f(ftInfo.m_feature);
}
@ -550,7 +550,7 @@ bool Editor::GetEditedFeatureStreet(FeatureID const & fid, string & outFeatureSt
return true;
}
vector<uint32_t> Editor::GetFeaturesByStatus(MwmSet::MwmId const & mwmId, FeatureStatus status) const
vector<uint32_t> Editor::GetFeaturesByStatus(MwmSet::MwmId const & mwmId, datasource::FeatureStatus status) const
{
vector<uint32_t> features;
auto const matchedMwm = m_features.find(mwmId);
@ -570,14 +570,14 @@ EditableProperties Editor::GetEditableProperties(FeatureType const & feature) co
ASSERT(version::IsSingleMwm(feature.GetID().m_mwmId.GetInfo()->m_version.GetVersion()),
("Edit mode should be available only on new data"));
ASSERT(GetFeatureStatus(feature.GetID()) != FeatureStatus::Obsolete,
ASSERT(GetFeatureStatus(feature.GetID()) != datasource::FeatureStatus::Obsolete,
("Edit mode should not be available on obsolete features"));
// TODO(mgsergio): Check if feature is in the area where editing is disabled in the config.
auto editableProperties = GetEditablePropertiesForTypes(feature::TypesHolder(feature));
// Disable opening hours editing if opening hours cannot be parsed.
if (GetFeatureStatus(feature.GetID()) != FeatureStatus::Created)
if (GetFeatureStatus(feature.GetID()) != datasource::FeatureStatus::Created)
{
auto const originalFeaturePtr = GetOriginalFeature(feature.GetID());
if (!originalFeaturePtr)
@ -683,9 +683,9 @@ void Editor::UploadChanges(string const & key, string const & secret, TChangeset
{
switch (fti.m_status)
{
case FeatureStatus::Untouched: CHECK(false, ("It's impossible.")); continue;
case FeatureStatus::Obsolete: continue; // Obsolete features will be deleted by OSMers.
case FeatureStatus::Created:
case datasource::FeatureStatus::Untouched: CHECK(false, ("It's impossible.")); continue;
case datasource::FeatureStatus::Obsolete: continue; // Obsolete features will be deleted by OSMers.
case datasource::FeatureStatus::Created:
{
XMLFeature feature = editor::ToXML(fti.m_feature, true);
if (!fti.m_street.empty())
@ -732,7 +732,7 @@ void Editor::UploadChanges(string const & key, string const & secret, TChangeset
}
break;
case FeatureStatus::Modified:
case datasource::FeatureStatus::Modified:
{
// Do not serialize feature's type to avoid breaking OSM data.
// TODO: Implement correct types matching when we support modifying existing feature types.
@ -768,7 +768,7 @@ void Editor::UploadChanges(string const & key, string const & secret, TChangeset
}
break;
case FeatureStatus::Deleted:
case datasource::FeatureStatus::Deleted:
auto const originalFeaturePtr = GetOriginalFeature(fti.m_feature.GetID());
if (!originalFeaturePtr)
{
@ -861,10 +861,10 @@ void Editor::SaveUploadedInformation(FeatureTypeInfo const & fromUploader)
Save();
}
bool Editor::FillFeatureInfo(FeatureStatus status, XMLFeature const & xml, FeatureID const & fid,
bool Editor::FillFeatureInfo(datasource::FeatureStatus status, XMLFeature const & xml, FeatureID const & fid,
FeatureTypeInfo & fti) const
{
if (status == FeatureStatus::Created)
if (status == datasource::FeatureStatus::Created)
{
editor::FromXML(xml, fti.m_feature);
}
@ -953,13 +953,13 @@ void Editor::Invalidate()
bool Editor::MarkFeatureAsObsolete(FeatureID const & fid)
{
auto const featureStatus = GetFeatureStatus(fid);
if (featureStatus != FeatureStatus::Untouched && featureStatus != FeatureStatus::Modified)
if (featureStatus != datasource::FeatureStatus::Untouched && featureStatus != datasource::FeatureStatus::Modified)
{
ASSERT(false, ("Only untouched and modified features can be made obsolete"));
return false;
}
MarkFeatureWithStatus(fid, FeatureStatus::Obsolete);
MarkFeatureWithStatus(fid, datasource::FeatureStatus::Obsolete);
Invalidate();
return Save();
@ -1013,7 +1013,7 @@ FeatureID Editor::GenerateNewFeatureId(MwmSet::MwmId const & id) const
// Scan all already created features and choose next available ID.
for (auto const & feature : found->second)
{
if (feature.second.m_status == FeatureStatus::Created && featureIndex <= feature.first)
if (feature.second.m_status == datasource::FeatureStatus::Created && featureIndex <= feature.first)
featureIndex = feature.first + 1;
}
}
@ -1055,7 +1055,7 @@ void Editor::CreateNote(ms::LatLon const & latLon, FeatureID const & fid,
case NoteProblemType::PlaceDoesNotExist:
{
sstr << kPlaceDoesNotExistMessage << endl;
auto const isCreated = GetFeatureStatus(fid) == FeatureStatus::Created;
auto const isCreated = GetFeatureStatus(fid) == datasource::FeatureStatus::Created;
auto const createdAndUploaded = (isCreated && IsFeatureUploaded(fid.m_mwmId, fid.m_index));
CHECK(!isCreated || createdAndUploaded, ());
@ -1093,7 +1093,7 @@ void Editor::UploadNotes(string const & key, string const & secret)
m_notes->Upload(OsmOAuth::ServerAuth({key, secret}));
}
void Editor::MarkFeatureWithStatus(FeatureID const & fid, FeatureStatus status)
void Editor::MarkFeatureWithStatus(FeatureID const & fid, datasource::FeatureStatus status)
{
auto & fti = m_features[fid.m_mwmId][fid.m_index];
@ -1152,7 +1152,7 @@ void Editor::ForEachFeatureAtPoint(FeatureTypeFn && fn, m2::PointD const & point
}
FeatureID Editor::GetFeatureIdByXmlFeature(XMLFeature const & xml, MwmSet::MwmId const & mwmId,
FeatureStatus status, bool needMigrate) const
datasource::FeatureStatus status, bool needMigrate) const
{
ForEachFeaturesNearByFn forEach = [this](FeatureTypeFn && fn, m2::PointD const & point)
{
@ -1209,17 +1209,5 @@ void Editor::LoadMwmEdits(xml_node const & mwm, MwmSet::MwmId const & mwmId, boo
}
}
string DebugPrint(Editor::FeatureStatus fs)
{
switch (fs)
{
case Editor::FeatureStatus::Untouched: return "Untouched";
case Editor::FeatureStatus::Deleted: return "Deleted";
case Editor::FeatureStatus::Obsolete: return "Obsolete";
case Editor::FeatureStatus::Modified: return "Modified";
case Editor::FeatureStatus::Created: return "Created";
};
}
const char * const Editor::kPlaceDoesNotExistMessage = "The place has gone or never existed. This is an auto-generated note from MAPS.ME application: a user reports a POI that is visible on a map (which can be outdated), but cannot be found on the ground.";
} // namespace osm

View file

@ -10,6 +10,7 @@
#include "indexer/editable_map_object.hpp"
#include "indexer/feature.hpp"
#include "indexer/feature_meta.hpp"
#include "indexer/feature_source.hpp"
#include "indexer/mwm_set.hpp"
#include "geometry/rect2d.hpp"
@ -68,17 +69,6 @@ public:
};
using TFinishUploadCallback = function<void(UploadResult)>;
enum class FeatureStatus
{
Untouched, // The feature hasn't been saved in the editor.
Deleted, // The feature has been marked as deleted.
Obsolete, // The feature has been marked for deletion via note.
Modified, // The feature has been saved in the editor and differs from the original one.
Created // The feature was created by a user and has been saved in the editor.
// Note: If a feature was created by a user but hasn't been saved in the editor yet
// its status is Untouched.
};
static Editor & Instance();
inline void SetDelegate(unique_ptr<Delegate> delegate) { m_delegate = move(delegate); }
@ -118,8 +108,8 @@ public:
// TODO(mgsergio): Unify feature functions signatures.
/// Easy way to check if a feature was deleted, modified, created or not changed at all.
FeatureStatus GetFeatureStatus(MwmSet::MwmId const & mwmId, uint32_t index) const;
FeatureStatus GetFeatureStatus(FeatureID const & fid) const;
datasource::FeatureStatus GetFeatureStatus(MwmSet::MwmId const & mwmId, uint32_t index) const;
datasource::FeatureStatus GetFeatureStatus(FeatureID const & fid) const;
/// @returns true if a feature was uploaded to osm.
bool IsFeatureUploaded(MwmSet::MwmId const & mwmId, uint32_t index) const;
@ -137,7 +127,7 @@ public:
bool GetEditedFeatureStreet(FeatureID const & fid, string & outFeatureStreet) const;
/// @returns sorted features indices with specified status.
vector<uint32_t> GetFeaturesByStatus(MwmSet::MwmId const & mwmId, FeatureStatus status) const;
vector<uint32_t> GetFeaturesByStatus(MwmSet::MwmId const & mwmId, datasource::FeatureStatus status) const;
enum SaveResult
{
@ -217,7 +207,7 @@ private:
struct FeatureTypeInfo
{
FeatureStatus m_status;
datasource::FeatureStatus m_status;
// TODO(AlexZ): Integrate EditableMapObject class into an editor instead of FeatureType.
FeatureType m_feature;
/// If not empty contains Feature's addr:street, edited by user.
@ -229,14 +219,14 @@ private:
string m_uploadError;
};
bool FillFeatureInfo(FeatureStatus status, editor::XMLFeature const & xml, FeatureID const & fid,
bool FillFeatureInfo(datasource::FeatureStatus status, editor::XMLFeature const & xml, FeatureID const & fid,
FeatureTypeInfo & fti) const;
/// @returns pointer to m_features[id][index] if exists, nullptr otherwise.
FeatureTypeInfo const * GetFeatureTypeInfo(MwmSet::MwmId const & mwmId, uint32_t index) const;
FeatureTypeInfo * GetFeatureTypeInfo(MwmSet::MwmId const & mwmId, uint32_t index);
void SaveUploadedInformation(FeatureTypeInfo const & fromUploader);
void MarkFeatureWithStatus(FeatureID const & fid, FeatureStatus status);
void MarkFeatureWithStatus(FeatureID const & fid, datasource::FeatureStatus status);
// These methods are just checked wrappers around Delegate.
MwmSet::MwmId GetMwmIdByMapName(string const & name);
@ -244,7 +234,7 @@ private:
string GetOriginalFeatureStreet(FeatureType & ft) const;
void ForEachFeatureAtPoint(FeatureTypeFn && fn, m2::PointD const & point) const;
FeatureID GetFeatureIdByXmlFeature(editor::XMLFeature const & xml, MwmSet::MwmId const & mwmId,
FeatureStatus status, bool needMigrate) const;
datasource::FeatureStatus status, bool needMigrate) const;
void LoadMwmEdits(pugi::xml_node const & mwm, MwmSet::MwmId const & mwmId, bool needMigrate);
// TODO(AlexZ): Synchronize multithread access.
@ -267,7 +257,4 @@ private:
unique_ptr<editor::StorageBase> m_storage;
}; // class Editor
string DebugPrint(Editor::FeatureStatus fs);
} // namespace osm

View file

@ -63,6 +63,8 @@ set(
feature_meta.cpp
feature_meta.hpp
feature_processor.hpp
feature_source.cpp
feature_source.hpp
feature_utils.cpp
feature_utils.hpp
feature_visibility.cpp

View file

@ -0,0 +1,66 @@
#include "indexer/feature_source.hpp"
#include "indexer/index.hpp"
namespace datasource
{
string ToString(FeatureStatus fs)
{
switch (fs)
{
case FeatureStatus::Untouched: return "Untouched";
case FeatureStatus::Deleted: return "Deleted";
case FeatureStatus::Obsolete: return "Obsolete";
case FeatureStatus::Modified: return "Modified";
case FeatureStatus::Created: return "Created";
};
return "Undefined";
}
FeatureSource::FeatureSource(MwmSet::MwmHandle const & handle) : m_handle(handle)
{
if (!m_handle.IsAlive())
return;
auto const & value = *m_handle.GetValue<MwmValue>();
m_vector = make_unique<FeaturesVector>(value.m_cont, value.GetHeader(), value.m_table.get());
}
size_t FeatureSource::GetNumFeatures() const
{
if (!m_handle.IsAlive())
return 0;
ASSERT(m_vector.get(), ());
return m_vector->GetNumFeatures();
}
bool FeatureSource::GetOriginalFeature(uint32_t index, FeatureType & feature) const
{
ASSERT(m_handle.IsAlive(), ());
ASSERT(m_vector != nullptr, ());
m_vector->GetByIndex(index, feature);
feature.SetID(FeatureID(m_handle.GetId(), index));
return true;
}
FeatureStatus FeatureSource::GetFeatureStatus(uint32_t index) const
{
return FeatureStatus::Untouched;
}
bool FeatureSource::GetModifiedFeature(uint32_t index, FeatureType & feature) const
{
return false;
}
void FeatureSource::ForEachInRectAndScale(m2::RectD const & rect, int scale,
std::function<void(FeatureID const &)> const & fn)
{
}
void FeatureSource::ForEachInRectAndScale(m2::RectD const & rect, int scale,
std::function<void(FeatureType &)> const & fn)
{
}
} // namespace datasource

View file

@ -0,0 +1,51 @@
#pragma once
#include "indexer/feature.hpp"
#include "indexer/features_vector.hpp"
#include "indexer/mwm_set.hpp"
#include <functional>
#include <memory>
#include <string>
namespace datasource
{
enum class FeatureStatus
{
Untouched, // The feature hasn't been saved in the editor.
Deleted, // The feature has been marked as deleted.
Obsolete, // The feature has been marked for deletion via note.
Modified, // The feature has been saved in the editor and differs from the original one.
Created // The feature was created by a user and has been saved in the editor.
// Note: If a feature was created by a user but hasn't been saved in the editor yet
// its status is Untouched.
}; // enum class FeatureStatus
std::string ToString(FeatureStatus fs);
inline std::string DebugPrint(FeatureStatus fs) { return ToString(fs); }
class FeatureSource
{
public:
FeatureSource(MwmSet::MwmHandle const & handle);
size_t GetNumFeatures() const;
bool GetOriginalFeature(uint32_t index, FeatureType & feature) const;
inline FeatureID GetFeatureId(uint32_t index) const { return FeatureID(m_handle.GetId(), index); }
virtual FeatureStatus GetFeatureStatus(uint32_t index) const;
virtual bool GetModifiedFeature(uint32_t index, FeatureType & feature) const;
virtual void ForEachInRectAndScale(m2::RectD const & rect, int scale,
std::function<void(FeatureID const &)> const & fn);
virtual void ForEachInRectAndScale(m2::RectD const & rect, int scale,
std::function<void(FeatureType &)> const & fn);
protected:
MwmSet::MwmHandle const & m_handle;
std::unique_ptr<FeaturesVector> m_vector;
}; // class FeatureSource
} // namespace datasource

View file

@ -128,7 +128,7 @@ unique_ptr<FeatureType> Index::FeaturesLoaderGuard::GetOriginalOrEditedFeatureBy
if (!m_handle.IsAlive())
return {};
ASSERT_NOT_EQUAL(m_editor.GetFeatureStatus(m_handle.GetId(), index), osm::Editor::FeatureStatus::Created, ());
ASSERT_NOT_EQUAL(m_editor.GetFeatureStatus(m_handle.GetId(), index), datasource::FeatureStatus::Created, ());
if (!GetFeatureByIndex(index, *feature))
return {};
@ -141,7 +141,7 @@ bool Index::FeaturesLoaderGuard::GetFeatureByIndex(uint32_t index, FeatureType &
return false;
MwmId const & id = m_handle.GetId();
ASSERT_NOT_EQUAL(osm::Editor::FeatureStatus::Deleted, m_editor.GetFeatureStatus(id, index),
ASSERT_NOT_EQUAL(datasource::FeatureStatus::Deleted, m_editor.GetFeatureStatus(id, index),
("Deleted feature was cached. It should not be here. Please review your code."));
if (m_editor.Instance().GetEditedFeature(id, index, ft))
return true;

View file

@ -4,6 +4,7 @@
#include "indexer/feature.hpp"
#include "indexer/feature_covering.hpp"
#include "indexer/features_offsets_table.hpp"
#include "indexer/feature_source.hpp"
#include "indexer/features_vector.hpp"
#include "indexer/mwm_set.hpp"
#include "indexer/scale_index.hpp"
@ -140,16 +141,16 @@ private:
FeatureType feature;
switch (m_editor.GetFeatureStatus(mwmID, index))
{
case osm::Editor::FeatureStatus::Deleted:
case osm::Editor::FeatureStatus::Obsolete:
case datasource::FeatureStatus::Deleted:
case datasource::FeatureStatus::Obsolete:
return;
case osm::Editor::FeatureStatus::Modified:
case datasource::FeatureStatus::Modified:
VERIFY(m_editor.GetEditedFeature(mwmID, index, feature), ());
m_f(feature);
return;
case osm::Editor::FeatureStatus::Created:
case datasource::FeatureStatus::Created:
CHECK(false, ("Created features index should be generated."));
case osm::Editor::FeatureStatus::Untouched: break;
case datasource::FeatureStatus::Untouched: break;
}
fv.GetByIndex(index, feature);
@ -202,7 +203,7 @@ private:
index.ForEachInIntervalAndScale(
[&](uint32_t index)
{
if (osm::Editor::FeatureStatus::Deleted !=
if (datasource::FeatureStatus::Deleted !=
m_editor.GetFeatureStatus(mwmID, index) &&
checkUnique(index))
m_f(FeatureID(mwmID, index));
@ -259,11 +260,11 @@ public:
pValue->m_table.get());
do
{
osm::Editor::FeatureStatus const fts = editor.GetFeatureStatus(id, fidIter->m_index);
ASSERT_NOT_EQUAL(osm::Editor::FeatureStatus::Deleted, fts,
datasource::FeatureStatus const fts = editor.GetFeatureStatus(id, fidIter->m_index);
ASSERT_NOT_EQUAL(datasource::FeatureStatus::Deleted, fts,
("Deleted feature was cached. It should not be here. Please review your code."));
FeatureType featureType;
if (fts == osm::Editor::FeatureStatus::Modified || fts == osm::Editor::FeatureStatus::Created)
if (fts == datasource::FeatureStatus::Modified || fts == datasource::FeatureStatus::Created)
{
VERIFY(editor.GetEditedFeature(id, fidIter->m_index, featureType), ());
}

View file

@ -167,7 +167,7 @@ void registerCellsForTableView(vector<MWMEditorCellType> const & cells, UITableV
@property(nonatomic) MWMEditorAdditionalNamesHeader * additionalNamesHeader;
@property(nonatomic) MWMEditorNotesFooter * notesFooter;
@property(copy, nonatomic) NSString * note;
@property(nonatomic) osm::Editor::FeatureStatus featureStatus;
@property(nonatomic) datasource::FeatureStatus featureStatus;
@property(nonatomic) BOOL isFeatureUploaded;
@property(nonatomic) BOOL showAdditionalNames;
@ -661,20 +661,20 @@ void registerCellsForTableView(vector<MWMEditorCellType> const & cells, UITableV
{
MWMButtonCell * tCell = static_cast<MWMButtonCell *>(cell);
auto title = ^NSString *(osm::Editor::FeatureStatus s, BOOL isUploaded)
auto title = ^NSString *(datasource::FeatureStatus s, BOOL isUploaded)
{
if (isUploaded)
return L(@"editor_place_doesnt_exist");
switch (s)
{
case osm::Editor::FeatureStatus::Untouched: return L(@"editor_place_doesnt_exist");
case osm::Editor::FeatureStatus::Deleted:
case osm::Editor::FeatureStatus::Obsolete: // TODO(Vlad): Either make a valid button or
case datasource::FeatureStatus::Untouched: return L(@"editor_place_doesnt_exist");
case datasource::FeatureStatus::Deleted:
case datasource::FeatureStatus::Obsolete: // TODO(Vlad): Either make a valid button or
// disable it.
NSAssert(false, @"Incorrect feature status!");
return L(@"editor_place_doesnt_exist");
case osm::Editor::FeatureStatus::Modified: return L(@"editor_reset_edits_button");
case osm::Editor::FeatureStatus::Created: return L(@"editor_remove_place_button");
case datasource::FeatureStatus::Modified: return L(@"editor_reset_edits_button");
case datasource::FeatureStatus::Created: return L(@"editor_remove_place_button");
}
};
@ -996,23 +996,23 @@ void registerCellsForTableView(vector<MWMEditorCellType> const & cells, UITableV
{
switch (self.featureStatus)
{
case osm::Editor::FeatureStatus::Untouched: placeDoesntExistAction(); break;
case osm::Editor::FeatureStatus::Modified:
case datasource::FeatureStatus::Untouched: placeDoesntExistAction(); break;
case datasource::FeatureStatus::Modified:
{
[self.alertController presentResetChangesAlertWithBlock:^{
revertAction(NO);
}];
break;
}
case osm::Editor::FeatureStatus::Created:
case datasource::FeatureStatus::Created:
{
[self.alertController presentDeleteFeatureAlertWithBlock:^{
revertAction(YES);
}];
break;
}
case osm::Editor::FeatureStatus::Deleted: break;
case osm::Editor::FeatureStatus::Obsolete: break;
case datasource::FeatureStatus::Deleted: break;
case datasource::FeatureStatus::Obsolete: break;
}
}
}

View file

@ -802,7 +802,7 @@ void Framework::FillInfoFromFeatureType(FeatureType const & ft, place_page::Info
{
using place_page::SponsoredType;
auto const featureStatus = osm::Editor::Instance().GetFeatureStatus(ft.GetID());
ASSERT_NOT_EQUAL(featureStatus, osm::Editor::FeatureStatus::Deleted,
ASSERT_NOT_EQUAL(featureStatus, datasource::FeatureStatus::Deleted,
("Deleted features cannot be selected from UI."));
info.SetFeatureStatus(featureStatus);
@ -881,7 +881,7 @@ void Framework::FillInfoFromFeatureType(FeatureType const & ft, place_page::Info
auto const mwmInfo = ft.GetID().m_mwmId.GetInfo();
bool const isMapVersionEditable = mwmInfo && mwmInfo->m_version.IsEditableMap();
bool const canEditOrAdd = featureStatus != osm::Editor::FeatureStatus::Obsolete && CanEditMap() &&
bool const canEditOrAdd = featureStatus != datasource::FeatureStatus::Obsolete && CanEditMap() &&
!info.IsNotEditableSponsored() && isMapVersionEditable;
info.SetCanEditOrAdd(canEditOrAdd);
@ -2782,7 +2782,7 @@ void SetStreet(search::ReverseGeocoder const & coder, Index const & index,
{
auto const & editor = osm::Editor::Instance();
if (editor.GetFeatureStatus(emo.GetID()) == osm::Editor::FeatureStatus::Created)
if (editor.GetFeatureStatus(emo.GetID()) == datasource::FeatureStatus::Created)
{
string street;
VERIFY(editor.GetEditedFeatureStreet(emo.GetID(), street), ("Feature is in editor."));
@ -3086,7 +3086,7 @@ bool Framework::RollBackChanges(FeatureID const & fid)
auto const rolledBack = editor.RollBackChanges(fid);
if (rolledBack)
{
if (status == osm::Editor::FeatureStatus::Created)
if (status == datasource::FeatureStatus::Created)
DeactivateMapSelection(true /* notifyUI */);
else
UpdatePlacePageInfoForCurrentSelection();

View file

@ -41,8 +41,8 @@ bool Info::ShouldShowAddPlace() const
bool Info::ShouldShowUGC() const
{
return ftraits::UGC::IsUGCAvailable(m_sortedTypes) &&
(m_featureStatus == osm::Editor::FeatureStatus::Untouched ||
m_featureStatus == osm::Editor::FeatureStatus::Modified);
(m_featureStatus == datasource::FeatureStatus::Untouched ||
m_featureStatus == datasource::FeatureStatus::Modified);
}
void Info::SetFromFeatureType(FeatureType const & ft)

View file

@ -158,7 +158,7 @@ public:
void SetPartnerIndex(int index);
/// Feature status
void SetFeatureStatus(osm::Editor::FeatureStatus const status) { m_featureStatus = status; }
void SetFeatureStatus(datasource::FeatureStatus const status) { m_featureStatus = status; }
/// Banner
bool HasBanner() const;
@ -280,7 +280,7 @@ private:
SponsoredType m_sponsoredType = SponsoredType::None;
/// Feature status
osm::Editor::FeatureStatus m_featureStatus = osm::Editor::FeatureStatus::Untouched;
datasource::FeatureStatus m_featureStatus = datasource::FeatureStatus::Untouched;
/// Sponsored feature urls.
std::string m_sponsoredUrl;

View file

@ -24,14 +24,14 @@ bool MwmContext::GetFeature(uint32_t index, FeatureType & ft) const
{
switch (GetEditedStatus(index))
{
case osm::Editor::FeatureStatus::Deleted:
case osm::Editor::FeatureStatus::Obsolete:
case datasource::FeatureStatus::Deleted:
case datasource::FeatureStatus::Obsolete:
return false;
case osm::Editor::FeatureStatus::Modified:
case osm::Editor::FeatureStatus::Created:
case datasource::FeatureStatus::Modified:
case datasource::FeatureStatus::Created:
VERIFY(osm::Editor::Instance().GetEditedFeature(GetId(), index, ft), ());
return true;
case osm::Editor::FeatureStatus::Untouched:
case datasource::FeatureStatus::Untouched:
m_vector.GetByIndex(index, ft);
ft.SetID(FeatureID(GetId(), index));
return true;

View file

@ -3,6 +3,8 @@
#include "search/house_to_street_table.hpp"
#include "search/lazy_centers_table.hpp"
#include "editor/osm_editor.hpp"
#include "indexer/features_vector.hpp"
#include "indexer/index.hpp"
#include "indexer/scale_index.hpp"
@ -37,7 +39,7 @@ public:
{
// TODO: Optimize deleted checks by getting vector of deleted indexes from
// the Editor.
if (GetEditedStatus(index) != osm::Editor::FeatureStatus::Deleted)
if (GetEditedStatus(index) != datasource::FeatureStatus::Deleted)
fn(index);
});
}
@ -80,7 +82,7 @@ public:
MwmValue & m_value;
private:
osm::Editor::FeatureStatus GetEditedStatus(uint32_t index) const
datasource::FeatureStatus GetEditedStatus(uint32_t index) const
{
return osm::Editor::Instance().GetFeatureStatus(GetId(), index);
}

View file

@ -70,9 +70,9 @@ public:
EditedFeaturesHolder(MwmSet::MwmId const & id) : m_id(id)
{
auto & editor = Editor::Instance();
m_deleted = editor.GetFeaturesByStatus(id, Editor::FeatureStatus::Deleted);
m_modified = editor.GetFeaturesByStatus(id, Editor::FeatureStatus::Modified);
m_created = editor.GetFeaturesByStatus(id, Editor::FeatureStatus::Created);
m_deleted = editor.GetFeaturesByStatus(id, datasource::FeatureStatus::Deleted);
m_modified = editor.GetFeaturesByStatus(id, datasource::FeatureStatus::Modified);
m_created = editor.GetFeaturesByStatus(id, datasource::FeatureStatus::Created);
}
bool ModifiedOrDeleted(uint32_t featureIndex) const

View file

@ -200,6 +200,8 @@
6758AED21BB4413000C26E27 /* drules_selector_parser.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 6758AECE1BB4413000C26E27 /* drules_selector_parser.hpp */; };
6758AED31BB4413000C26E27 /* drules_selector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6758AECF1BB4413000C26E27 /* drules_selector.cpp */; };
6758AED41BB4413000C26E27 /* drules_selector.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 6758AED01BB4413000C26E27 /* drules_selector.hpp */; };
675B562320D25C9800A521D2 /* feature_source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 675B562120D25C9800A521D2 /* feature_source.cpp */; };
675B562420D25C9800A521D2 /* feature_source.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 675B562220D25C9800A521D2 /* feature_source.hpp */; };
67BC92F31D21476500A4A378 /* string_set.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 67BC92EF1D21476500A4A378 /* string_set.hpp */; };
67BC92F41D21476500A4A378 /* string_slice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 67BC92F01D21476500A4A378 /* string_slice.cpp */; };
67BC92F51D21476500A4A378 /* string_slice.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 67BC92F11D21476500A4A378 /* string_slice.hpp */; };
@ -426,6 +428,8 @@
6758AECE1BB4413000C26E27 /* drules_selector_parser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = drules_selector_parser.hpp; sourceTree = "<group>"; };
6758AECF1BB4413000C26E27 /* drules_selector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = drules_selector.cpp; sourceTree = "<group>"; };
6758AED01BB4413000C26E27 /* drules_selector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = drules_selector.hpp; sourceTree = "<group>"; };
675B562120D25C9800A521D2 /* feature_source.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = feature_source.cpp; sourceTree = "<group>"; };
675B562220D25C9800A521D2 /* feature_source.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = feature_source.hpp; sourceTree = "<group>"; };
67BC92EF1D21476500A4A378 /* string_set.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = string_set.hpp; sourceTree = "<group>"; };
67BC92F01D21476500A4A378 /* string_slice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = string_slice.cpp; sourceTree = "<group>"; };
67BC92F11D21476500A4A378 /* string_slice.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = string_slice.hpp; sourceTree = "<group>"; };
@ -709,6 +713,8 @@
6726C1CF1A49DAAC005EEA39 /* feature_meta.cpp */,
6726C1D01A49DAAC005EEA39 /* feature_meta.hpp */,
675340CC1A3F540F00A0A8C3 /* feature_processor.hpp */,
675B562120D25C9800A521D2 /* feature_source.cpp */,
675B562220D25C9800A521D2 /* feature_source.hpp */,
675340CD1A3F540F00A0A8C3 /* feature_utils.cpp */,
675340CE1A3F540F00A0A8C3 /* feature_utils.hpp */,
675340CF1A3F540F00A0A8C3 /* feature_visibility.cpp */,
@ -849,6 +855,7 @@
3D0AEAFB1FBAF9E900AD042B /* test_with_classificator.hpp in Headers */,
6753412F1A3F540F00A0A8C3 /* index_builder.hpp in Headers */,
456E1B1A1F90E5B7009C32E1 /* ftypes_sponsored.hpp in Headers */,
675B562420D25C9800A521D2 /* feature_source.hpp in Headers */,
675341411A3F540F00A0A8C3 /* scales.hpp in Headers */,
675341321A3F540F00A0A8C3 /* interval_index_builder.hpp in Headers */,
40009062201F5CB000963E18 /* cell_value_pair.hpp in Headers */,
@ -1087,6 +1094,7 @@
67BC92F41D21476500A4A378 /* string_slice.cpp in Sources */,
675341071A3F540F00A0A8C3 /* data_factory.cpp in Sources */,
34583BCB1C88552100F94664 /* map_object.cpp in Sources */,
675B562320D25C9800A521D2 /* feature_source.cpp in Sources */,
6753412E1A3F540F00A0A8C3 /* index_builder.cpp in Sources */,
675341011A3F540F00A0A8C3 /* classificator_loader.cpp in Sources */,
456E1B191F90E5B7009C32E1 /* ftypes_sponsored.cpp in Sources */,