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

Method GetFeatureDescription

libs/search/result.cpp:102–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102std::string Result::GetFeatureDescription() const
103{
104 std::string res = GetLocalizedFeatureType();
105 if (res.empty())
106 return res;
107
108 auto const append = [&res](std::string_view sv)
109 {
110 if (!res.empty())
111 res += feature::kFieldsSeparator;
112 res += sv;
113 };
114
115 // Clear, because GetLocalizedFeatureType will be shown as main title.
116 if (m_str.empty())
117 res.clear();
118
119 if (m_mainType != m_matchedType && m_matchedType != 0 && !ftypes::Subtypes::Instance().IsSubtype(m_matchedType))
120 append(GetLocalizedTypeName(m_matchedType));
121
122 if (!GetDescription().empty())
123 append(GetDescription());
124
125 return res;
126}
127
128m2::PointD Result::GetFeatureCenter() const
129{

Callers 1

ToJavaResultFunction · 0.45

Calls 6

GetDescriptionFunction · 0.85
IsSubtypeMethod · 0.80
GetLocalizedTypeNameFunction · 0.70
GetLocalizedFeatureTypeFunction · 0.50
emptyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected