MCPcopy Create free account
hub / github.com/comaps/comaps / ForEachMetadataReadable

Method ForEachMetadataReadable

libs/indexer/map_object.hpp:49–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48 template <class FnT>
49 void ForEachMetadataReadable(FnT && fn) const
50 {
51 m_metadata.ForEach([&fn](MetadataID id, std::string const & value)
52 {
53 switch (id)
54 {
55 case MetadataID::FMD_WIKIPEDIA: fn(id, feature::Metadata::ToWikiURL(value)); break;
56 case MetadataID::FMD_WIKIMEDIA_COMMONS: fn(id, feature::Metadata::ToWikimediaCommonsURL(value)); break;
57 /// @todo Clients should make separate processing of non-string values, skip for now.
58 /// @see EditableMapObject::ForEachMetadataItem.
59 case MetadataID::FMD_DESCRIPTION:
60 case MetadataID::FMD_CUSTOM_IDS:
61 case MetadataID::FMD_PRICE_RATES:
62 case MetadataID::FMD_RATINGS:
63 case MetadataID::FMD_EXTERNAL_URI: break;
64 default: fn(id, value); break;
65 }
66 });
67 }
68
69 /// @returns non-localized cuisines keys.
70 std::vector<std::string> GetCuisines() const;

Callers 2

InjectMetadataFunction · 0.80

Calls 1

ForEachMethod · 0.45

Tested by

no test coverage detected