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

Method GetResourceReader

libs/indexer/map_style_reader.cpp:107–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107ReaderPtr<Reader> StyleReader::GetResourceReader(std::string const & file, std::string_view density) const
108{
109 std::string resFile =
110 base::JoinPath("symbols", std::string{density}, GetStyleResourcesSuffix(GetCurrentStyle()), file);
111
112 auto overriddenResFile = base::JoinPath(GetPlatform().WritableDir(), kStylesOverrideDir, resFile);
113 if (GetPlatform().IsFileExistsByFullPath(overriddenResFile))
114 resFile = overriddenResFile;
115
116#ifdef BUILD_DESIGNER
117 // For Designer tool we have to look first into the resource folder.
118 return GetPlatform().GetReader(resFile, "rwf");
119#else
120 return GetPlatform().GetReader(resFile);
121#endif
122}
123
124ReaderPtr<Reader> StyleReader::GetDefaultResourceReader(std::string const & file) const
125{

Callers 3

LoadSymbolsFunction · 0.80
LoadDataFunction · 0.80

Calls 4

JoinPathFunction · 0.85
GetStyleResourcesSuffixFunction · 0.85
GetReaderMethod · 0.45

Tested by 1