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

Function GetStyleStatistics

qt/build_style/build_statistics.cpp:17–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace build_style
16{
17QString GetStyleStatistics(QString const & mapcssMappingFile, QString const & drulesFile)
18{
19 if (!QFile(mapcssMappingFile).exists())
20 throw std::runtime_error("mapcss-mapping file does not exist at " + mapcssMappingFile.toStdString());
21
22 if (!QFile(drulesFile).exists())
23 throw std::runtime_error("drawing-rules file does not exist at " + drulesFile.toStdString());
24
25 // Add path to the protobuf EGG in the PROTOBUF_EGG_PATH environment variable.
26 QProcessEnvironment env{QProcessEnvironment::systemEnvironment()};
27 env.insert("PROTOBUF_EGG_PATH", GetProtobufEggPath());
28
29 // Run the script.
30#if defined(OMIM_OS_MAC)
31 return ExecProcess("python3",
32 {
33 GetExternalPath("drules_info.py", "kothic/src", "../tools/python/stylesheet"),
34 mapcssMappingFile,
35 drulesFile,
36 },
37 &env);
38#else
39 return ExecProcess("python",
40 {
41 GetExternalPath("drules_info.py", "kothic/src", "../tools/python/stylesheet"),
42 mapcssMappingFile,
43 drulesFile,
44 },
45 &env);
46#endif
47}
48
49QString GetCurrentStyleStatistics()
50{

Callers 1

Calls 4

GetProtobufEggPathFunction · 0.85
ExecProcessFunction · 0.85
GetExternalPathFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected