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

Method Transform

generator/hierarchy.cpp:243–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243HierarchyEntry HierarchyLinesBuilder::Transform(HierarchyLinker::Node::Ptr const & node)
244{
245 HierarchyEntry line;
246 auto const & data = node->GetData();
247 line.m_id = data.GetCompositeId();
248 auto const parent = node->GetParent();
249 if (parent)
250 line.m_parentId = parent->GetData().GetCompositeId();
251
252 line.m_country = m_countryName;
253 line.m_depth = GetDepth(node);
254 line.m_name = m_getName(data.GetName());
255 line.m_type = m_getMainType(data.GetTypes());
256 line.m_center = GetCenter(node);
257 return line;
258}
259
260HierarchyLinker::Node::Ptrs BuildHierarchy(std::vector<feature::FeatureBuilder> && fbs,
261 GetMainTypeFn const & getMainType,

Callers

nothing calls this directly

Calls 6

GetDepthFunction · 0.85
GetCenterFunction · 0.85
GetDataMethod · 0.45
GetParentMethod · 0.45
GetNameMethod · 0.45
GetTypesMethod · 0.45

Tested by

no test coverage detected