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

Function ForEachCountry

generator/borders.cpp:39–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37
38template <class ToDo>
39void ForEachCountry(std::string const & baseDir, ToDo && toDo)
40{
41 std::string const bordersDir = base::JoinPath(baseDir, BORDERS_DIR);
42 CHECK(Platform::IsFileExistsByFullPath(bordersDir), ("Cannot read borders directory", bordersDir));
43
44 Platform::FilesList files;
45 Platform::GetFilesByExt(bordersDir, BORDERS_EXTENSION, files);
46 for (std::string file : files)
47 {
48 PolygonsList polygons;
49 if (LoadBorders(bordersDir + file, polygons))
50 {
51 base::GetNameWithoutExt(file);
52 toDo(std::move(file), std::move(polygons));
53 }
54 }
55}
56
57class PackedBordersGenerator
58{

Callers 5

LoadCountriesListFunction · 0.85
GeneratePackedBordersFunction · 0.85
GoImplMethod · 0.85
CalcUSALimitRectMethod · 0.85
CalcLimitRectMethod · 0.85

Calls 3

JoinPathFunction · 0.85
GetNameWithoutExtFunction · 0.85
LoadBordersFunction · 0.70

Tested by

no test coverage detected