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

Function HierarchyEntryToCsvRow

generator/hierarchy_entry.cpp:76–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76coding::CSVReader::Row HierarchyEntryToCsvRow(HierarchyEntry const & entry)
77{
78 coding::CSVReader::Row row;
79 row.emplace_back(entry.m_id.ToString());
80 std::string parentId;
81 if (entry.m_parentId)
82 parentId = (*entry.m_parentId).ToString();
83
84 row.emplace_back(parentId);
85 row.emplace_back(strings::to_string(entry.m_depth));
86 row.emplace_back(strings::to_string_dac(entry.m_center.x, 7));
87 row.emplace_back(strings::to_string_dac(entry.m_center.y, 7));
88 row.emplace_back(strings::to_string(classif().GetReadableObjectName(entry.m_type)));
89 row.emplace_back(strings::to_string(entry.m_name));
90 row.emplace_back(strings::to_string(entry.m_country));
91 return row;
92}
93
94HierarchyEntry HierarchyEntryFromCsvRow(coding::CSVReader::Row const & row)
95{

Callers 2

UNIT_CLASS_TESTFunction · 0.85

Calls 5

to_stringFunction · 0.85
to_string_dacFunction · 0.85
GetReadableObjectNameMethod · 0.80
emplace_backMethod · 0.45
ToStringMethod · 0.45

Tested by 1

UNIT_CLASS_TESTFunction · 0.68