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

Function DumpTypes

generator/dumper.cpp:87–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void DumpTypes(string const & fPath)
88{
89 TypesCollector doClass;
90 feature::ForEachFeature(fPath, doClass);
91
92 typedef pair<vector<uint32_t>, size_t> stats_elem_type;
93 typedef vector<stats_elem_type> vec_to_sort;
94 vec_to_sort vecToSort(doClass.m_stats.begin(), doClass.m_stats.end());
95 sort(vecToSort.begin(), vecToSort.end(), &SortFunc<stats_elem_type>);
96
97 for (auto const & el : vecToSort)
98 {
99 cout << el.second << " ";
100 for (uint32_t i : el.first)
101 cout << classif().GetFullObjectName(i) << " ";
102 cout << endl;
103 }
104 cout << "Total features: " << doClass.m_totalCount << endl;
105 cout << "Features with names: " << doClass.m_namesCount << endl;
106}
107
108///////////////////////////////////////////////////////////////////
109

Callers 1

generator_tool.cppFile · 0.85

Calls 4

ForEachFeatureFunction · 0.85
GetFullObjectNameMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected