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

Method GetDrawingRulesReader

libs/indexer/map_style_reader.cpp:91–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91ReaderPtr<Reader> StyleReader::GetDrawingRulesReader() const
92{
93 std::string rulesFile = std::string("drules_proto") + GetStyleRulesSuffix(GetCurrentStyle()) + ".bin";
94
95 auto overriddenRulesFile = base::JoinPath(GetPlatform().WritableDir(), kStylesOverrideDir, rulesFile);
96 if (Platform::IsFileExistsByFullPath(overriddenRulesFile))
97 rulesFile = overriddenRulesFile;
98
99#ifdef BUILD_DESIGNER
100 // For Designer tool we have to look first into the resource folder.
101 return GetPlatform().GetReader(rulesFile, "rwf");
102#else
103 return GetPlatform().GetReader(rulesFile);
104#endif
105}
106
107ReaderPtr<Reader> StyleReader::GetResourceReader(std::string const & file, std::string_view density) const
108{

Callers 1

LoadRulesFunction · 0.80

Calls 3

GetStyleRulesSuffixFunction · 0.85
JoinPathFunction · 0.85
GetReaderMethod · 0.45

Tested by

no test coverage detected